home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / DOSREF33.ZIP / CHAPTER.002 < prev    next >
Text File  |  1994-01-20  |  114KB  |  1,924 lines

  1.  
  2.    **  Programmer's Technical Reference for MSDOS and the IBM PC **
  3.             USA copyright TXG 392-616  ALL RIGHTS RESERVED
  4.  ──────────────────────────┤ DOSREF (tm) ├───────────────────────────
  5.                  ISBN 1-878830-02-3 (disk-based text)
  6.                 Copyright (c) 1987, 1994 Dave Williams
  7.                     ┌─────────────────────────────┐
  8.                     │ Shareware Version, 01/20/94 │
  9.                     │  Please Register Your Copy  │
  10.                     └─────────────────────────────┘
  11.  
  12.                          C H A P T E R   T W O
  13.  
  14.  
  15.        CPU Port Assignments, System Memory Map, BIOS Data Area,
  16.                          Interrupts 00h to 09h
  17.  
  18.  
  19.  
  20.                                 C O N T E N T S
  21.  
  22. Introduction ................................................... 2**1
  23. System Memory Map .............................................. 2**2
  24. A Brief Guide to Current Memory Terminology .................... 2**3
  25. PC Port Assignment ............................................. 2**4
  26. Reserved Memory Locations ...................................... 2**5
  27. Absolute Addresses ............................................. 2**6
  28. The IBM PC System Interrupts (Overview) ........................ 2**7
  29. Quick Chart of Interrupts 00h-0FFh ............................. 2**8
  30. IRQ Usage Chart ................................................ 2**9
  31. The IBM-PC System Interrupts 00h-0Fh (in detail) ............... 2**10
  32.  
  33.  
  34.  
  35. Introduction ................................................... 2**1
  36.  
  37.   For consistency in this reference, all locations and offsets are in 
  38. hexadecimal unless otherwise specified. All hex numbers are prefaced 
  39. with a leading zero if they begin with an alphabetic character, and 
  40. are terminated with a lowercase H (h). The formats vary according to 
  41. common usage. 
  42.  
  43.  
  44.  
  45. System Memory Map .............................................. 2**2
  46.  
  47.   The IBM PC handles its address space in 64k segments, divided into 
  48. 16k fractions and then further as necessary. 
  49.  
  50. ┌──────┬─────┬─────┬────────────────────────────────────────────────┐
  51. │start │start│end  │                                                │
  52. │addr. │addr.│addr.│                     usage                      │
  53. │(dec) │   (hex)   │                                                │
  54. ├──────┴───────────┴────────────────────────────────────────────────┤
  55. │   *640k RAM Area*                                                 │
  56. ├──────┬─────────┬──────────────────────────────────────────────────┤
  57. │ 0k   │         │  start of RAM, first K is interrupt vector table │
  58. │ 16k  │0000-03FF│  PC-0 system board RAM ends                      │
  59. │ 32k  │0400-07FF│                                                  │
  60. │ 48k  │0800-0BFF│                                                  │
  61. ├──────┼─────────┼──────────────────────────────────────────────────┤
  62. │ 64k  │1000-13FF│  PC-1 system board RAM ends                      │
  63. │ 80k  │1400-17FF│                                                  │
  64. │ 96k  │1800-1BFF│                                                  │
  65. │ 112k │1C00-1FFF│                                                  │
  66. ├──────┼─────────┼──────────────────────────────────────────────────┤
  67. │ 128k │2000-23FF│                                                  │
  68. │ 144k │2400-27FF│                                                  │
  69. │ 160k │2800-2BFF│                                                  │
  70. │ 176k │2C00-2FFF│                                                  │
  71. ├──────┼─────────┼──────────────────────────────────────────────────┤
  72. │ 192k │3000-33FF│                                                  │
  73. │ 208k │3400-37FF│                                                  │
  74. │ 224k │3800-3BFF│                                                  │
  75. │ 240k │3C00-3FFF│                                                  │
  76. ├──────┼─────────┼──────────────────────────────────────────────────┤
  77. │ 256k │4000-43FF│  PC-2 system board RAM ends                      │
  78. │ 272k │4400-47FF│                                                  │
  79. │ 288k │4800-4BFF│                                                  │
  80. │ 304k │4C00-4FFF│                                                  │
  81. ├──────┼─────────┼──────────────────────────────────────────────────┤
  82. │ 320k │5000-53FF│                                                  │
  83. │ 336k │5400-57FF│                                                  │
  84. │ 352k │5800-5BFF│                                                  │
  85. │ 368k │5C00-5FFF│                                                  │
  86. ├──────┼─────────┼──────────────────────────────────────────────────┤
  87. │ 384k │6000-63FF│                                                  │
  88. │ 400k │6400-67FF│                                                  │
  89. │ 416k │6800-6BFF│                                                  │
  90. │ 432k │6C00-6FFF│                                                  │
  91. ├──────┼─────────┼──────────────────────────────────────────────────┤
  92. │ 448k │7000-73FF│                                                  │
  93. │ 464k │7400-77FF│                                                  │
  94. │ 480k │7800-7BFF│                                                  │
  95. │ 496k │7C00-7FFF│                                                  │
  96. ├──────┼─────────┼──────────────────────────────────────────────────┤
  97. │ 512k │8000-83FF│                                                  │
  98. │ 528k │8400-87FF│                                                  │
  99. │ 544k │8800-8BFF│  the original IBM PC-1 BIOS limited memory to    │
  100. │ 560k │8C00-8FFF│  544k                                            │
  101. ├──────┼─────────┼──────────────────────────────────────────────────┤
  102. │ 576k │9000-93FF│                                                  │
  103. │ 592k │9400-97FF│                                                  │
  104. │ 609k │9800-9BFF│                                                  │
  105. │ 624k │9C00-9FFF│ to 640k (top of RAM address space)               │
  106. │ 639k │         │ some RLL and SCSI hard disk adapters, some four  │
  107. │      │         │ floppy controller cards, some AMI and PS/2 BIOS, │
  108. │      │         │ and assorted other cards sometimes try to use the│
  109. │      │         │ last K for storing temporary data.  This can     │
  110. │      │         │ cause trouble with programs which assume they    │
  111. │      │         │ have a full 640k, and will prevent backfilling   │
  112. │      │         │  memory with some memory managers.  Beware!      │
  113. ├──────┴─────────┴──────────────────────────────────────────────────┤
  114. │A0000 ***** 64k ***** EGA/VGA starting address                     │
  115. │A0000 ***** 64k ***** Toshiba 1000 DOS ROM (MS-DOS 2.11V)          │
  116. ├──────┬───────────┬────────────────────────────────────────────────┤
  117. │ 640k │A0000-A95B0│  MCGA 320x200 256 color video buffer           │
  118. │      │     -AF8C0│  MCGA 640x480 2 color video buffer             │
  119. │      │     -A3FFF│                                                │
  120. │ 656k │A4000-A7FFF│                                                │
  121. │ 672k │A8000-ABFFF│this 64k segment may be used for contiguous DOS │
  122. │ 688k │AC000-AFFFF│RAM with appropriate hardware and software      │
  123. ├──────┴───────────┴────────────────────────────────────────────────┤
  124. │B0000 ***** 64k ***** mono and CGA address                         │
  125. ├──────┬───────────┬────────────────────────────────────────────────┤
  126. │ 704k │B0000-B3FFF│4k  mono display | The PCjr and early Tandy 1000│
  127. │ 720k │B4000-B7FFF│                 | BIOS revector direct write to│
  128. │ 736k │B8000-BBFFF│16k CGA          | the B8 area to the Video Gate│
  129. │ 756k │BC000-BFFFF│                 | Array and reserved system RAM│
  130. ├──────┴───────────┴────────────────────────────────────────────────┤
  131. │C0000 ***** 64k *************** expansion ROM                      │
  132. ├──────┬───────────┬────────────────────────────────────────────────┤
  133. │ 768k │C0000-C3FFF│16k EGA BIOS C000:001E EGA BIOS signature       │
  134. │      │           │    (the letters 'IBM')                         │
  135. │      │C0000-C7FFF│32k VGA BIOS extension (typical)                │
  136. │ 784k │C4000-C5FFF│                                                │
  137. │      │C6000-C63FF│256 bytes IBM PGC video communications area     │
  138. │      │C6400-C7FFF│                                                │
  139. │ 800k │C8000-CBFFF│16k hard disk controller BIOS, drive 0 default  │
  140. │      │CA000      │    some 2nd floppy (HD) controller BIOSes      │
  141. │ 816k │CC000-CDFFF│ 8k IBM PC Network NETBIOS                      │
  142. │      │CE000-CFFFF│                                                │
  143. ├──────┴───────────┴────────────────────────────────────────────────┤
  144. │D0000 ***** 64k ***** expansion ROM                                │
  145. ├──────┬───────────┬────────────────────────────────────────────────┤
  146. │ 832k │D0000-D7FFF│32k IBM Cluster Adapter  | PCjr first ROM cart. │
  147. │      │      DA000│voice communications     | address area.        │
  148. │ 848k │D4000-D7FFF│                         | Common EMS board     │
  149. │ 864k │D8000-DBFFF│                         | paging area.         │
  150. │      │D8000-DBFFF│ IBM Token Ring default Share RAM address       │
  151. │      │DC000      │ IBM Token Ring default BIOS/MMIO address       │
  152. │ 880k │DC000-DFFFF│                         |                      │
  153. │      │DE000      │4k  TI Pro default video buffer                 │
  154. ├──────┴───────────┴────────────────────────────────────────────────┤
  155. │E0000 ***** 64k ***** expansion ROM                                │
  156. │                      wired to ROM sockets in the original IBM AT  │
  157. │                      used by ABIOS extensions on some PS/2 models │
  158. ├──────┬───────────┬────────────────────────────────────────────────┤
  159. │ 896k │E0000-E3FFF│                         | PCjr second ROM cart.│
  160. │ 912k │E4000-E7FFF│                         | address area         │
  161. │ 928k │E8000-EBFFF│                         |                      │
  162. │ 944k │EC000-EFFFF│                         | spare ROM sockets on │
  163. │      │           │                         | IBM AT (reserved in  │
  164. │      │           │                         | hardware)            │
  165. ├──────┴───────────┴────────────────────────────────────────────────┤
  166. │F0000 ***** 64k ***** system                                       │
  167. ├──────┬───────────┬────────────────────────────────────────────────┤
  168. │ 960k │F0000-F3FFF│reserved by IBM          | cartridge address    │
  169. │ 976k │F4000-     │                         | area (PCjr cartridge │
  170. │      │F6000      │ROM BASIC Begins         | BASIC)               │
  171. │ 992k │F8000-FB000│                         |                      │
  172. │ 1008k│FC000-FFFFF│ROM BASIC and original   |                      │
  173. │      │           │BIOS (Compatibility BIOS |                      │
  174. │      │           │in PS/2)                 |                      │
  175. │ 1024k│      FFFFF│end of memory (1024k) for 8088 machines         │
  176. ├──────┼───────────┴─┬──────────────────────────────────────────────┤
  177. │ 384k │100000-15FFFF│ 80286/AT extended memory area, 1Mb mbd.      │
  178. │ 15Mb │100000-FFFFFF│ 80286/AT extended memory address space       │
  179. │ 15Mb │160000-FDFFFF│ Micro Channel RAM expansion (15Mb ext. mem)  │
  180. │ 128k │FE0000-FFFFFF│ system board ROM        (PS/2 Advanced BIOS) │
  181. ├──────┼─────────────┴───┬──────────────────────────────────────────┤
  182. │  64k │C0000000-C000FFFF│ Weitek "Abacus" math coprocessor         │
  183. │      │                 │ memory-mapped I/O                        │
  184. └──────┴─────────────────┴──────────────────────────────────────────┘
  185.  
  186. 1) Note that the ROM BIOS has a duplicated address space which causes 
  187.    it to "appear" both at the end of the 1 megabyte real mode space
  188.    and at the end of the 16 megabyte protected mode space.  The
  189.    addresses from 0E0000 to 0FFFFF are equal to 0FE0000 to 0FFFFFF.
  190.    This is necessary due to differences in the memory addressing
  191.    between Real and Protected Modes. 
  192.  
  193. 2) Late IBM XTs and ATs with support for the 101-key keyboards ran out 
  194.    of ROM space at the top of their ROM blocks. These machines "wrap
  195.    around" and jump to an address lower than their original entry
  196.    point to store their code. 
  197.  
  198.                           ┌────────────────────┐
  199.                     1024k │   top of memory    │
  200.                           ├────────────────────┤
  201.                      976k │ original BIOS area │ ────┐
  202.                           ├────────────────────┤     │
  203.                           │ extended BIOS area │  <──┘
  204.                           ├────────────────────┤
  205.  
  206. 3) IBM PS/2s reserve the last K of memory before A000 for a scratch 
  207.    area for the ABIOS ROM routines.  This limits PS/2 machines to
  208.    639k.  Apparently only 10 to 20 bytes of memory is actually used;
  209.    though there was room for that much down in unused portions of
  210.    the BIOS Data Area, IBM evidently decided to leave room to grow. 
  211.  
  212.     Sometimes other stuff can use the last K.  OMTI hard disk 
  213.     controllers' firmware wanted the last K, as do some XTs with ROM-
  214.     based disk caches.  These don't like to coexist at all.
  215.     SpeedStor (disk management software) has a program called OMTIfix
  216.     bundled to allow it to work with these controllers.  A few
  217.     extended-VGA ANSI drivers also grab the last K.  QEMM, 386Max,
  218.     and other memory managers can relocate this memory to give a 
  219.     complete 640k. 
  220.  
  221. 4) When running with a 286 and memory manager board or on a 386, PC-
  222.    MOS/386 relocates its kernel to the 0C000-0F000 high memory area
  223.    to leave more of the lower 640k for applications.  0A000-0BFFFF
  224.    is reserved for swapping video RAM as it becomes active.  MOS
  225.    supports monochrome and CGA modes directly. 
  226.  
  227. 5) Most AT compatible machines use the entire Fxxx block for BIOS.  
  228.    PS/2 and PS/2 compatible machines take an entire 128k from E000-
  229.    FFFF.  Most real IBM machines also have the BASIC ROMs taking up
  230.    some of the high address space. 
  231.  
  232.  
  233.  
  234. A Brief Guide to Current Memory Terminology .................... 2**3
  235.  
  236. LOW MEMORY - 0000h to around 0:5(something), comprising the 80x8x
  237.              interrupt vector table, the BIOS Data Area, DOS Data
  238.              Area, etc.
  239.  
  240. CONVENTIONAL MEMORY - from the end of low memory to the beginning of
  241.              the "reserved by IBM" A000 segment (640k).
  242.  
  243. HIGH MEMORY - originally noncontiguous RAM stuffed into the "reserved
  244.              for ROM expansion" areas, typically segments D000 and
  245.              E000.  DOS normally can't access this memory without a
  246.              driver of some sort, but it's easy to put RAMdisks and
  247.              stuff in there.
  248.  
  249. HIGH DOS MEMORY - same as above.
  250.  
  251. CONVENTIONAL MEMORY - extra RAM stuck at A000, assuming the machine
  252.              already has 640k, appears as conventional memory accessible
  253.              to DOS and applications.  IBM clones can typically add 64k
  254.              before bumping into a mono card or 96k before hitting a
  255.              color card.  This address is part of the EGA/VGA video RAM
  256.              area and most EGA cards don't like system memory at A000.
  257.              With semi-compatible machines like the IBM PCjr or Sanyo
  258.              55x, it was possible to get as much as 960k of real, usable
  259.              DOS conventional memory, since they used a different video
  260.              system and had no hard disk ROM to break up the space
  261.              between 640k and the beginning of the ROM BIOS.
  262.  
  263. EXPANDED MEMORY - LIM 3.2, LIM 4.0, or EEMS 3.2 bank switched memory.
  264.              A RAM "window" allows an application to save a block of
  265.              RAM to an expansion board.  The window size and location
  266.              varies according to the EMS standard being used.
  267.  
  268. EXTENDED MEMORY - this is the "native mode" address space of the 80286
  269.              and later chips.  The "real mode", or 8088 addressing
  270.              scheme, sees RAM as a collection of segments and offsets
  271.              with a limit on segment size.  "Protected mode" addressing
  272.              uses a flat linear addressing scheme.  8088 and 80188 chips
  273.              do not have extended memory.
  274.  
  275. HIGH MEMORY - by fiddling a bit with the segment/offset stuff, you can
  276.              get an extra block of addressable 8088-mode memory just
  277.              over the 1 meg address space when using 80286 and later
  278.              microprocessors.  Microsoft issued their "HMA" (High Memory
  279.              Area) standard to try to standardize use of this block.
  280.              Though it really is "high" memory, "high" had for many years
  281.              referred to memory between 640k and 1mb.  This creates more
  282.              confusion for new programmers.
  283.  
  284. EMS - this is expanded memory as described above
  285.  
  286. XMS - Microsoft is pushing an "Extended Memory Standard" which defines
  287.       a page-switching scheme much like EMS.  The only real difference
  288.       is that XMS uses protected-mode RAM instead of a special paged
  289.       RAM board.
  290.  
  291. XMS - some severely brain-damaged jerk at IBM issued documentation for
  292.       some IBM *EMS* boards referring to the boards as *XMS*.  This
  293.       was a classic blunder, and now some IBM-followers are picking up
  294.       the aberrant terminology.  This is guaranteed to confuse some
  295.       people.  To make it simple, if it needs an expansion board, it is
  296.       EMS no matter what the vendor calls it.
  297.  
  298. UMB - Upper Memory Blocks.  These are defined in the Microsoft XMS
  299.       Specification.  Unfortunately, some people have begun using "UMB"
  300.       to refer to the HMA and High DOS areas indiscriminately.
  301.  
  302.  
  303.  
  304. PC Port Assignment ............................................. 2**4
  305.  
  306.   The Intel 80x86 processors have a 64K I/O memory space for 
  307. addressing external devices.  The 8088 through 80286 processors can 
  308. divide their I/O space into either 8 bit or 16 bit ports.  The 386 and 
  309. later can have 8, 16, or 32 bit ports. 
  310.  
  311.   Some port addresses are mapped to the motherboard, others to the 
  312. slots. The XT's boundary was at 200h, while the AT and EISA is at 
  313. 100h.  Many cards avoid the 100h-200h zone for XT compatibility. 
  314.  
  315.   These are functions common across the IBM range.  The PCjr, PC-AT, 
  316. PC Convertible and PS/2 (both buses) have enhancements.  In some 
  317. cases, the AT and PS/2 series ignore, duplicate, or reassign ports 
  318. arbitrarily.  If your code incorporates specific port addresses for 
  319. video or system board control it would be wise to have your 
  320. application determine the machine type and video adapter and address 
  321. the ports as required. 
  322.  
  323.  
  324.  hex address                   Function                   Models
  325.                                                 PCjr|PC|XT|AT|CVT|M30|PS2
  326.  
  327.  0000-000F    8237 DMA controller                  PC------------------
  328.  0000-001F    8237 DMA controller 1                 -----AT---------PS2
  329.  0020-0027    8259A interrupt controller            -------------------
  330.  0020-002F    IOSGA interrupt function              ----------------PS2
  331.  0020-003F    8259A interrupt controller  (AT)      -------------------
  332.  0020-0021    interrupt controller 1, 8259A        PC----AT---------PS2
  333.  0040-0043    programmable timer 8253              PC------------------
  334.  0040-0047    programmable timers                   ----------------PS2
  335.  0040-005F    8253-5 programmable timers            -----AT------------
  336.               note 1) 0041 was memory refresh in PCs. Not used in PS/2.
  337.                    2) A few early 80386 machines used static RAM and did
  338.                       not use refresh at all. The PCjr refreshes by the
  339.                       video vertical retrace signal.
  340.  0040         8254 programmable interval timer 1 system clock (counter 0)
  341.  0041         8254 timer 1 refresh request (counter 1)
  342.  0042         8254 timer 1 speaker tone (counter 2) -------------------
  343.  0043         8254 timer 1 command register         -------------------
  344.  0049         8254 timer 2 not used (counter 1)     -------------------
  345.  004A         programmable interval timer 2         -------------------
  346.  004B         programmable interval timer 2         -------------------
  347.  0060-0063    keyboard controller 8255A             PC-----------------
  348.  0060-006F    8042 keyboard controller              -----AT------------
  349.  0060         8042 data I/O register                -------------------
  350.  0060         IOSGA keyboard input port             ----------------PS2
  351.  0061         speaker                         PCjr PC-XT-AT-CVT--------
  352.  0061         IOSGA speaker control                 ------------M30-PS2
  353.  0061         On some clones, setting or clearing bit 2 controls
  354.               Turbo mode
  355.  0061         Toshiba 1000 - system command         -------------------
  356.  0062         IOSGA configuration control           ------------M30-PS2
  357.  0062         Toshiba 1000 - System Status, port C  -------------------
  358.  0063         SSGA, undocumented                    ----------------PS2
  359.  0063         Toshiba 1000 - mode set               -------------------
  360.  0064         keyboard auxiliary device             ----------------PS2
  361.  0064         keyboard 8042 status register         -----AT------------
  362.  0065         AT&T 6300+ high/low chip select       -------------------
  363.  0065-006A    SSGA, undocumented                    ----------------PS2
  364.  0066         AT&T 6300+ system configuration switch 2
  365.  0067         AT&T 6300+ system configuration switch 1
  366.  0068         C&T chipsets, turbo mode              -------------------
  367.  006B         SSGA, RAM enable/remap                ----------------PS2
  368.  006C-006F    SSGA, undocumented                    ----------------PS2
  369.  0070         AT CMOS write internal register       -------------------
  370.  0071         AT CMOS read internal register        -------------------
  371.  0070-0071    CMOS real-time clock, NMI mask        ----------------PS2
  372.  0070-007F    CMOS real-time clock, NMI mask        -----AT, AT&T 6300+
  373.  0074-0076    reserved                              ----------------PS2
  374.  0080-0083    AT&T 6300+ DMA page registers (8 bit) -------------------
  375.  0080-008F    SSGA DMA page registers               ----------------PS2
  376.  0080-009F    DMA page registers, 74LS612           -----AT------------
  377.               Channel 2 = 0081
  378.               Channel 3 = 0082
  379.               Channel 1 = 0083
  380.               Channel 0 = 0087
  381.               Channel 6 = 0089
  382.               Channel 5 = 008B
  383.  0090         central arbitration control port (Micro Channel)
  384.  0091         card selected feedback           (Micro Channel)
  385.  0092         system control port A            (Micro Channel)
  386.  0092         Fast Gate A20, some C&T chipsets, Micronics motherboards
  387.  0093         reserved                         (Micro Channel)
  388.  0094         system board setup               (Micro Channel)
  389.  0096         POS "CD SETUP" selector          (Micro Channel)
  390.  00A0-00A1    Interrupt controller 2, 8259A         -----AT---------PS2
  391.  00A0-00A3    AT&T 6300+, NMI register              -------------------
  392.  00A0-00AF    IOSGA NMI mask register               ----------------PS2
  393.  00B0-00BF    realtime clock/calendar, (undocumented) --------------PS2
  394.  00C0-00C3    AT&T 6300+, reserved                  -------------------
  395.  00C0-00CF    DOS ROM register, Toshiba 1000        -------------------
  396.  00C0-00CF    8237A-5 word DMA controller
  397.  00C0-00DF    reserved                        PCjr PC XT AT CVT M30
  398.  00D0-00D3    AT&T 6300+, reserved                  -------------------
  399.  00D0-00EF    "special" register, Toshiba 1000      -------------------
  400.       00C0    0C1 key register, Toshiba 1000        -------------------
  401.       00C1    keyboard transfer register, Toshiba 1000
  402.       00C2    keyboard receive register, Toshiba 1000
  403.       00C3    keyboard status register, Toshiba 1000-------------------
  404.       00C8    DOS ROM page register, Toshiba 1000   -------------------
  405.       00E0    CPU speed control, Toshiba 1000       -------------------
  406.       00E1    keyboard status/0E2 key register, Toshiba 1000
  407.       00E2    work register, Toshiba 1000           -------------------
  408.       00E3    0E4 key register, Toshiba 1000        -------------------
  409.       00E4    system control register 0, Toshiba 1000
  410.       00E4    Weitek ABACUS NDP - bit 0=1, ABACUS is present
  411.       00E5    0E6 key register, Toshiba 1000        -------------------
  412.       00E6    system control register 1, Toshiba 1000
  413.       00EE    EMS unit index, Toshiba 1000          -------------------
  414.       00EF    EMS unit data, Toshiba 1000           -------------------
  415.  00C0-00DF    DMA controller 2, 8237A-5             -----AT---------PS2
  416.  00E0-00EF    realtime clock/calendar  (undocumented)-----------M30 PS2
  417.  00E0-00FF    AT&T 6300+, 80287                     -------------------
  418.  00F0-00FF    PS/2 math coprocessor I/O  (Model 50+)
  419.               (diskette IO on PCjr)
  420.  00F0         clear math coprocessor busy           -------------------
  421.  00F1         reset math coprocessor                -------------------
  422.  00F8-00FF    AT 80287/80387 coprocessor control    -------------------
  423.  0100-0101    PS/2 POS adapter ID response            (Micro Channel)
  424.  0100-010F    Always IN-2000 alternate 2            -------------------
  425.  0100-02F7    AT&T 6300+, reserved                  -------------------
  426.  0102-0107    PS/2 POS adapter configuration response (Micro Channel)
  427.  0110-011F    Always IN-2000 alternate 2            -------------------
  428.  0150         Geographics Drafting Board digitizer  -------------------
  429.  0180         Stargate Plus 8 multiport serial board-------------------
  430.  01F0-01F8    hard disk                             -----AT---------PS2
  431.  0200-0201    game-control adapter (joystick)       -------------------
  432.  0200-0207    Sound Blaster joystick port           -------------------
  433.  0200-020F    game controller                       PC---AT------------
  434.  0200-020F    Always IN-2000 alternate 1
  435.  0208-0209    Chips & Technology CS8221 chipset default EMS ports
  436.               alternate addresses: 218h, 258h, 268h, 2A8h, 2B8h, 2E8h
  437.  0208-020F    Toshiba 1000 - EMS unit I/O #1        -------------------
  438.  020C-020D    reserved by IBM                       -------------------
  439.  0210-0217    IBM expansion chassis (PC, XT)        -------------------
  440.  0218-021F    Toshiba 1000 - EMS unit I/O #2        -------------------
  441.  021F         reserved by IBM                       -------------------
  442.  0220         LANtastic 2mbps adapter optional      -------------------
  443.  0220         Sound Blaster 1-6 data port opt 1     -------------------
  444.  0221         Sound Blaster 1-6 register port opt 1 -------------------
  445.  0222         Sound Blaster 7-12 data port opt 1    -------------------
  446.  0223         Sound Blaster 7-12 register port opt 1-------------------
  447.               (opt 1:220h, opt 2:210h, opt 3:230h, opt 4: 240h, opt
  448.                5:250h, opt 5:260h, FM music and DSP ports also adjustable)
  449.  0220-022F    Always IN-2000 SCSI adapter default addresses
  450.  0220         IRMA 3270 terminal emulator command port
  451.  0221         IRMA 3270 terminal emulator data port 1
  452.  0222         IRMA 3270 terminal emulator data port 2
  453.  0223         IRMA 3270 terminal emulator data port 3
  454.  0224         IRMA 3270 terminal emulator reserved for future use
  455.  0225         IRMA 3270 terminal emulator reserved for future use
  456.  0226         IRMA 3270 terminal emulator Command Request flag
  457.  0226         Sound Blaster DSP Reset               -------------------
  458.  0227         IRMA 3270 terminal emulator Attention Request flag
  459.  0228         Sound Blaster FM music data/status port
  460.  0229         Sound Blaster FM music register port  -------------------
  461.  022A         Sound Blaster DSP (voice I/O and MIDI) Read Data
  462.  022C         Sound Blaster DSP Write Data or Command
  463.  022C         Sound Blaster DSP Write Buffer Status (bit 7)
  464.  022C         Marstek scanner adapter, optional     -------------------
  465.  022E         Sound Blaster DSP Data Available (bit 7)
  466.  0232-023E    Microsoft bus & InPort mouse cards (default address)
  467.  0238-023C    Microsoft bus & InPort mouse cards (optional address)
  468.  023C-023F    Logitech bus mouse                    -------------------
  469.  0240         LANtastic 2mbps adapter optional      -------------------
  470.  0240-0247    Corvus Omninet NIC opt 1              -------------------
  471.  0248-024F    Corvus Omninet NIC opt 2              -------------------
  472.  0250-0257    Corvus Omninet NIC opt 3              -------------------
  473.  0258-0259    LIM EMS 3.1 (not defined in 3.2+)     -------------------
  474.  0258-025F    Corvus Omninet NIC opt 4              -------------------
  475.  0258-025F    Toshiba 1000 - EMS unit I/O #3        -------------------
  476.  0260         LANtastic 2mbps adapter optional      -------------------
  477.  0268         CompuCom internal modem, COM20, COM21, COM22
  478.  026C         Marstek scanner adapter, optional     -------------------
  479.  0268-026F    Toshiba 1000 - EMS unit I/O #4        -------------------
  480.  0268-026F    Copy II PC Option Board, default      -------------------
  481.  0278         CompuCom internal modem, COM6, COM8, COM13
  482.  0278-027F    parallel printer port 2               -----AT------------
  483.  0278-027B    parallel printer port 3               ----------------PS2
  484.  0280-0281    Frecom FAX96 board default            -------------------
  485.  0280-0284    NetWorth Engineering vLAN V2.1 NIC opt 1
  486.  0280         LANtastic 2mbps adapter optional      -------------------
  487.  0280         Logitech ScanMan, default             -------------------
  488.  0280         Needham Electronics PB-10 EPROM burner, optional
  489.  0288-0289    Frecom FAX96 board alternate 1        -------------------
  490.  0290         Needham Electronics PB-10 EPROM burner, optional
  491.  02A0         Logitech ScanMan, option 1            -------------------
  492.  02A0-02BF    Gateway G-Net NIC opt 1               -------------------
  493.  02A0         LANtastic 2mbps adapter optional      -------------------
  494.  02A2         clock chip in early Sperry PCs        -------------------
  495.  02A8-02AF    Toshiba 1000 - EMS unit I/O #5        -------------------
  496.  02AC         Marstek scanner adapter, optional     -------------------
  497.  02B0-02DF    EGA (alternate)                       PC---AT------------
  498.  02B8-02BF    Toshiba 1000 - EMS unit I/O #6        -------------------
  499.  02B8-02B9    Novell Star Intelligent NIC opt 1     -------------------
  500.  02B8-02BB    Novell Standard NIC                   -------------------
  501.  02BC-02BD    Novell Star Intelligent NIC opt 2     -------------------
  502.  02C0-02DF    Toshiba 1000 - realtime clock         -------------------
  503.  02C0-02C7    AST SixPackPlus clock                 -------------------
  504.  02E0-02EF    Gateway G-Net NIC opt 2               -------------------
  505.  02E0-02EF    Allen-Bradley VistaLAN/PC adapter, optional address 1
  506.  02E0-02EF    Standard Microsystems ARCNET NIC opt 1-------------------
  507.  02E0         Stac Electronics AT/16 compression board (Stacker)
  508.  02E0         this is a common address for generic Arcnet cards
  509.  02E1         GPIB (adapter 0)                      -----AT------------
  510.  02E2-02E3    data acquisition (adapter 0)          -----AT------------
  511.  02E8         "industry standard" COM4              -------------------
  512.  03E8         CompuCom internal modem, COM17, COM18, COM19
  513.  02E8-02EF    Toshiba 1000 - EMS unit I/O #7        -------------------
  514.  02E8-02EF    Copy II PC Option board, optional 1   -------------------
  515.  02EC         most Marstek scanner boards, default  -------------------
  516.  02F0-02FF    Standard Microsystems ARCNET NIC opt 2-------------------
  517.  02F8-02FF    serial communications (COM2)          PC---AT---------PS2
  518.  0300         Periscope debugger card               -------------------
  519.  0300-0307    Pelican 5.5mb floppy adapter, default address
  520.  0300-030F    Standard Microsystems ARCNET NIC opt 3-------------------
  521.  0300-030F    3Com EtherLink NIC opt 1              -------------------
  522.  0300-031F    Gateway G-Net NIC opt 3               -------------------
  523.  0300-031F    prototype card                        PC---AT------------
  524.  0300-031F    Leading Edge Model D clock            -------------------
  525.  0300         some Samsung XT clock/calendar on motherboard
  526.  0300         Needham Electronics PB-10 EPROM burner, default
  527.  0300-0303    Tecmar/Wangtek PC-36 tape controller board, default
  528.  0300-0307    3Com 3C505 EtherLink Plus NIC opt 1   -------------------
  529.  0300-0307    Proteon ProNET NIC w/checksum opt 1   -------------------
  530.  0308-030F    Proteon ProNET NIC w/checksum opt 2   -------------------
  531.  0300-031F    Torus Ethernet adapter, optional address 1
  532.  0300-031F    Micom-Interlan N15010 Ethernet NIC opt 1
  533.  0300-031F    Cabletron Ethernet E-1010 NIC         -------------------
  534.  0310-0317    3Com 3C505 EtherLink Plus NIC opt 1   -------------------
  535.  0310-0317    Proteon ProNET NIC w/checksum opt 3   -------------------
  536.  0310-0317    Pelican 5.5mb floppy adapter, optional address 1
  537.  0310-031F    3Com EtherLink NIC opt 2              -------------------
  538.  0320         LANtastic 2mbps adapter optional      -------------------
  539.  0320         Perstor HD controller, primary addr   -------------------
  540.  0320         many CD-ROM proprietary adapters, default address
  541.  0320-0323    AT&T 6300+, hard disk controller      -------------------
  542.  0320-0327    3Com 3C505 EtherLink Plus NIC opt 1   -------------------
  543.  0320-032F    hard disk controller                  PC-----------------
  544.  0320-033F    Torus Ethernet adapter, optional address 2
  545.  0320-033F    Micom-Interlan N15010 Ethernet NIC opt 1
  546.  0324         Perstor PS180 HD ctrlr, 2ndary addr   -------------------
  547.  0324-0327    C: common secondary hard disk controller address
  548.  032C         Marstek scanner adapter, optional     -------------------
  549.  0330         Logitech ScanMan, option 2            -------------------
  550.  0338-033B    Tecmar PC-36 tape controller board, option 1
  551.  0340         LANtastic 2mbps adapter optional      -------------------
  552.  0340         Logitech ScanMan, option 3            -------------------
  553.  0340         Sony CD-ROM adapters                  -------------------
  554.  0340         Severn (Sony) CD-ROM adapters         -------------------
  555.  0340-0347    Proteon ProNET NIC w/checksum opt 4   -------------------
  556.  0340-0347    Novell Disk Coprocessor #1            -------------------
  557.  0348-034F    Novell Disk Coprocessor #2            -------------------
  558.  0348-0357    DCA 3278 emulator                     -------------------
  559.  0358-0359    Novell Star Intelligent NIC opt 3     -------------------
  560.  035C-035D    Novell Star Intelligent NIC opt 4     -------------------
  561.  0360         LANtastic 2mbps adapter optional      -------------------
  562.  0360-0367    PC Network (low address)              -------------------
  563.  0360-0367    AT&T StarLAN NIC opt 1                -------------------
  564.  0360-0367    Ungermann-Bass Net/One Personal Connection NIC
  565.  0368         CompuCom internal modem, COM7, COM11, COM12
  566.  0368-036B    Tecmar PC-36 tape controller board, option 2
  567.  036C         Marstek scanner adapter, optional
  568.  0368-036F    PC Network (high address)             -----AT------------
  569.  0368-036F    AT&T StarLAN NIC opt 2                -------------------
  570.  0368-036F    Ungermann-Bass Net/One Personal Connection NIC
  571.  0368-036F    Torus Ethernet adapter, optional address 3
  572.  0368-036F    Copy II PC Option Board, optional 2   -------------------
  573.  0370         Colorado Memory external tape backup control port -------
  574.               Archive external tape backup control port ---------------
  575.  0370-0377    some "second controller" floppy cards -------------------
  576.  0372         Systen OmniBridge floppy card, alternate address 1
  577.  0378         CompuCom internal modem, COM5, COM9, COM10
  578.  0378-037F    parallel printer port                 PC---AT------------
  579.  0378-037B    parallel printer port                 ----------------PS2
  580.  0380-0387    PCNet NIC, Orchid, Santa Clara, AST   -------------------
  581.  0380-0387    Pelican 5.5mb floppy adapter, optional address 2 --------
  582.  0380-0381    Frecom FAX96 board alternate 2        -------------------
  583.  0380-0384    NetWorth Engineering vLAN V2.1 NIC opt 1
  584.  0380-038F    Eicon Technology Network Adapter (X.25) board (default)
  585.  0380-038F    SDLC, bi-synchronous 2                PC---AT------------
  586.  0380-0389    BSC communications (alternate)        PC-----------------
  587.  0388-0389    Frecom FAX96 board alternate 3        -------------------
  588.  0388-0389    Sound Blaster FM music, alternate 2   -------------------
  589.  0390         Needham Electronics PB-10 EPROM burner, optional
  590.  0390-0397    Pelican 5.5mb floppy adapter, optional address 3 --------
  591.  0390-039F    Eicon Technology Network Adapter (X.25) board (alternate)
  592.  0390-0393    cluster (adapter 0)                   PC---AT------------
  593.  0398-039B    Tecmar PC-36 tape controller board, option 3
  594.  03A0-03A9    BSC communications (primary)          PC---AT------------
  595.  03AC         Marstek scanner adapter, optional     -------------------
  596.  03B0-03BF    monochrome/parallel printer adapter   PC---AT------------
  597.  03B4-03B5    video subsystem                       ----------------PS2
  598.  03B4-03BF    Hercules Mono Card                    -------------------
  599.  03BA         video subsystem                       ----------------PS2
  600.  03BC-03BF    parallel printer port 1               ----------------PS2
  601.  03C0-03CF    Enhanced Graphics Adapter             -------------------
  602.  03C0-03DA    video subsystem and DAC               ----------------PS2
  603.  03C8-03CB    Tecmar PC-36 tape controller board, option 4
  604.  03DA         video status register                 AT&T 6300, Olivetti PC
  605.  03D0-03DF    CGA, MCGA, VGA adapter control        -------------------
  606.  03DE         video mode selector register          AT&T 6300, Olivetti PC
  607.  03E0-03EF    Allen-Bradley VistaLAN/PC adapter, optional address 1
  608.  03E8h        "industry standard" COM3              -------------------
  609.  03E8         CompuCom internal modem, COM14, COM15, COM16
  610.  03E8-03EF    Copy II PC Option Board, optional 3   -------------------
  611.  03F0-03F7    floppy disk controller                PC---AT---------PS2
  612.  03F0         Colorado Memory internal tape backup control port -------
  613.  03F2         DTK high-density XT floppy controller (output only)
  614.  03F2         Systen OmniBridge floppy card, alternate address 2
  615.  03F5         DTK high-density XT floppy controller PC-XT--------------
  616.  03FC         Marstek scanner adapter, optional     -------------------
  617.  03F8-03FF    serial communications (COM1)          PC---AT---------PS2
  618.  0400-3FFF    AT&T 6300+, unused                    -------------------
  619.  06E2-06E3    data acquisition (adapter 1)          -----AT------------
  620.  0790-0793    cluster (adapter 1)                   PC---AT------------
  621.  0878         Compaq 386SX VGA BIOS relocation      -----AT------------
  622.  0920         C&T/Micronics Fast Gate A20           -------------------
  623.  0A20-0A23    IBM Token Ring opt 1                  -------------------
  624.  0A24-0A27    IBM Token Ring opt 2                  -------------------
  625.  0AE2-0AE3    data acquisition (adapter 2)          -----AT------------
  626.  0B90-0B93    cluster (adapter 2)                   PC---AT------------
  627.  OC80-0C83    EISA Product Identifier access port   -------------------
  628.               2 bytes  3 letters (compressed) abbreviated manufacturer ID.
  629.                        The letters "ISA" are reserved for old bus boards.
  630.               1 byte   2-digit product number
  631.               1 byte   2-digit revision number
  632.               (mfr. abbreviations are assigned by BCPR Services, the
  633.                group that distributes the EISA specification)
  634.  0EE2-0EE3    data acquisition (adapter 3)          -----AT------------
  635.  
  636.  1390-1393    cluster (adapter 3)                   PC---AT------------
  637.  2160         IBM XGA adapter (not motherboard) (only 1 installed)
  638.  22E1         GPIB (adapter 1)                      -------------------
  639.  2390-2393    cluster (adapter 4)                   PC---AT------------
  640.  3F00-3F1F    AT&T 6300+, -RESET CS                 -------------------
  641.  3F20-3F3F    AT&T 6300+, -PROTECTEN                -------------------
  642.  3F40-3F5F    AT&T 6300+, -TIME SLICEN              -------------------
  643.  3F60-3F7F    AT&T 6300+, -TRAPCE                   -------------------
  644.  3F80-3F9F    AT&T 6300+, -VXLATEN                  -------------------
  645.  3FA0-3FBF    AT&T 6300+, -BITREAD                  -------------------
  646.  3FC0-3FDF    AT&T 6300+, -ADADV                    -------------------
  647.  3FE0-3FFF    AT&T 6300+, -CLear TRAP address       -------------------
  648.  4258         LIM EMS 3.1 (not defined in 3.2+)     -------------------
  649.  42E1         GPIB (adapter 2)                      -----AT------------
  650.  62E1         GPIB (adapter 3)                      -----AT------------
  651.  8258         LIM EMS 3.1 (not defined in 3.2+)     -------------------
  652.  82E1         GPIB (adapter 4)                      -----AT------------
  653.  A2E1         GPIB (adapter 5)                      -----AT------------
  654.  C258         LIM EMS 3.1 (not defined in 3.2+)     -------------------
  655.  C2E1         GPIB (adapter 6)                      -----AT------------
  656.  E2E1         GPIB (adapter 7)                      -----AT------------
  657.  
  658. note 1) IOSGA = I/O Support Gate Array
  659.         SSGA = System Support Gate Array
  660.      2) I/O Addresses, hex 000 to 0FF, are reserved for the system
  661.         board I/O.  Hex 100 to 3FF are available on the I/O channel.
  662.      3) These are the addresses decoded by the current set of adapter
  663.         cards.  IBM may use any of the unlisted addresses in the future.
  664.      4) SDLC Communication and Secondary Binary Synchronous
  665.         Communications cannot be used together because their port
  666.         addresses overlap.
  667.  
  668.  
  669.  
  670. Reserved Memory Locations ...................................... 2**5
  671.  
  672. ┌───────────────────────────────────────────────────────────────────────
  673. │ 000-3FF  - 1k DOS interrupt vector table, 4 byte vectors for 
  674. │            interrupts 00h-0FFh.
  675. │   30:00  - used as a stack area during POST and bootstrap routines.
  676. │to 3F:FF    This stack area may be revectored by user applications
  677. ├───────────────────────────────────────────────────────────────────────
  678. │ ** The BIOS Data Area ** addresses from 400h to 4FFh
  679. ├─────┬───────┬─────────────────────────────────────────────────────────
  680. │addr.│ size  │                         description
  681. ├─────┼───────┼─────────────────────────────────────────────────────────
  682. │40:00│  word │ COM1 port addr. |  These addresses are zeroed out in the
  683. │40:02│  word │ COM2 port addr. |  OS/2 DOS Compatibility Box if any of
  684. │40:04│  word │ COM3 port addr. |  the OS/2 COMxx.SYS drivers are loaded.
  685. │40:06│  word │ COM4 port addr. | | note: no value for COM2 was set in
  686. │40:08│  word │ LPT1 port addr.   |       early IBM PS/2 Model 50Zs.
  687. │40:0A│  word │ LPT2 port addr.     | DESQview sets 40:00-40:02 to zero
  688. │40:0C│  word │ LPT3 port addr.     | if a program is swappable
  689. │40:0E│  word │ LPT4 port addr.   (not valid in PS/2 machines)
  690. │40:0E│  word │ PS/2 pointer to 1k extended BIOS Data Area at top of
  691. │40:10│  word │ RAM equipment flag (see int 11h)
  692. └─────┴───────┤ bits:
  693.               │ 0       0       no floppy drive present
  694.               │         1       if floppy drive present (see bits 6&7)
  695.               │ 1       0       no math coprocessor installed
  696.               │         1       if 80x87 installed  (not valid in PCjr)
  697.               │ 2,3     system board RAM   (not used on AT or PS/2)
  698.               │         0,0     16k             0,1     32k
  699.               │         1,0     48k             1,1     64k
  700.               │ 4,5     initial video mode
  701.               │         0,0     no video adapter
  702.               │         0,1     40 column color  (PCjr default)
  703.               │         1,0     80 column color
  704.               │         1,1     MDA
  705.               │ 6,7     number of diskette drives
  706.               │         0,0     1 drive         0,1     2 drives
  707.               │         1,0     3 drives        1,1     4 drives
  708.               │ 8       0       DMA present
  709.               │         1       DMA not present (PCjr, Tandy 1400,
  710.               │                 Sanyo 55x)
  711.               │ 9,A,B   number of RS232 serial ports
  712.               │ C       game adapter  (joystick)
  713.               │         0       no game adapter
  714.               │         1       if game adapter
  715.               │ D       serial printer (PCjr only)
  716.               │         0       no printer
  717.               │         1       serial printer present
  718.        ┌──────┘ E,F     number of parallel printers installed
  719.        │note 1) The IBM PC and AT store the settings of the system board
  720.        └───┐    switches or CMOS RAM setup information (as obtained by
  721.            │    the BIOS in the Power-On Self Test (POST)) at addresses
  722.            │    40:10h and 40:13h. 00000001b indicates "on", 00000000b
  723.            │    is "off".
  724.            │ 2) DOS only uses 40:10 when it's booting to find out how
  725.            │    many drives it has.  XT BIOSes use 40:10 to find out how
  726.            │    many drives they support, but AT BIOSes don't seem to -
  727.            │    they use the state bytes at 40:90/91 instead.
  728. ┌─────┬────┴──┐
  729. │40:12│  byte │ reserved (PC, AT)
  730. └─────┴───────┤ number of errors detected by infrared keyboard link
  731.               │ (PCjr) manufacturer test (Phoenix BIOS)
  732.               │   bits 7-1 reserved
  733.               │   bit  0    0 non-test mode
  734.               │             1 manufacturing test mode
  735. ┌─────┬───────┤ POST status (Convertible)
  736. │40:13│  word │ available memory size in Kbytes, less display RAM in
  737. └─────┴───────┤ PCjr, or Extended BIOS Data Area (40:0E) if used.  This
  738. ┌─────┬───────┤ is the value returned by int 12h.
  739. │40:15│  word │ reserved
  740. │40:17│  byte │ keyboard flag byte 0 (see int 9h)
  741. └─────┴───────┤ bit 7  insert mode on      3  alt pressed
  742.               │     6  capslock on         2  ctrl pressed
  743.               │     5  numlock on          1  left shift pressed
  744. ┌─────┬───────┤     4  scrollock on        0  right shift pressed
  745. │40:18│  byte │ keyboard flag byte 1 (see int 9h)    (IBM, old style)
  746. └─────┴───────┤ bits 0=not pressed, 1=pressed
  747.               │ bit 7  insert pressed      3  ctrl-numlock (pause) toggled
  748.               │     6  capslock pressed    2  PCjr keyboard click active
  749.               │     5  numlock pressed     1  PCjr ctrl-alt-capslock held
  750.               │     4  scrollock pressed   0
  751.               │
  752.               │ keyboard flag byte 1 (see int 9h)  (IBM, Phoenix, new style)
  753.               │ bit 7  insert pressed      3  ctrl-numlock (pause) toggled
  754.               │     6  capslock pressed    2  SysReq pressed (enhanced kbd)
  755.               │     5  numlock pressed     1  Left alt pressed (enhanced kbd)
  756. ┌─────┬───────┤     4  scrollock pressed   0  Right alt pressed (enhanced kbd)
  757. │40:19│  byte │ storage for alternate keypad entry (not normally used)
  758. │     │       │ Phoenix says, "Work area for Alt key and numeric keypad
  759. │     │       │ input"
  760. │40:1A│  word │ pointer to keyboard buffer head character
  761. │40:1C│  word │ pointer to keyboard buffer tail character
  762. │40:1E│32bytes│ 16 2-byte entries for keyboard circular buffer, read by
  763. │     │       │ int 16h a maximum of 15 entries are used at one time
  764. │40:3E│  byte │ drive seek status - if bit=0, next seek will recalibrate
  765. └─────┴───────┤ by repositioning to Track 0.
  766.               │ bit 7  disk hdw int occured 5  not used
  767.               │     6  not used             4  not used
  768.               │     3  drive D          bit 2  drive C
  769. ┌─────┬───────┤     1  drive B              0  drive A
  770. │40:3F│  byte │ diskette motor status (bit set to indicate condition)
  771. └─────┴───────┤ bit 7    0   current operation is a read or verify
  772.               │          1   current operation is a write or format
  773.               │     6        reserved
  774.               │     5,4      drive select states, where:
  775.               │          00  drive 0 selected
  776.               │          01  drive 1 selected
  777.               │          10  drive 2 selected
  778.               │          11  drive 3 selected
  779.               │     3    1   motor on (drive 3)
  780.               │     2    1   motor on (drive 2)
  781.               │     1    1   motor on (drive 1)
  782. ┌─────┬───────┤     0    1   motor on (drive 0)
  783. │40:40│  byte │ motor off counter
  784. │     │       │ starts at 37 and is decremented 1 by each system clock
  785. │     │       │ tick.  Motor is shut off when count = 0.
  786. │40:41│  byte │ status of last diskette operation     where:
  787. └─────┴───────┤   (IBM XT)
  788.               │ bit 7 timeout failure              3 DMA overrun
  789.               │     6 seek failure                 2 sector not found
  790.               │     5 controller failure           1 address not found
  791.               │     4 CRC failure                  0 bad command
  792.               │   (Phoenix)
  793.               │ bit 7    1   drive not ready
  794.               │     6    1   seek failure
  795.               │     5    1   controller failure
  796.               │     4,0      error codes in hex, where:
  797.               │              01h  illegal function request
  798.               │              02h  address mark not found
  799.               │              03h  write protect error
  800.               │              04h  sector not found
  801.               │              06h  diskette change line active
  802.               │                   (AT & later)
  803.               │              08h  DMA overrun
  804.               │              09h  64K DMA boundary error
  805.               │              0Ch  media type not found
  806.               │              10h  uncorrectable EEC or CRC error
  807.               │              20h  general controller failure
  808.               │              40h  seek operation failed
  809. ┌─────┬───────┤              80h  timeout
  810. │40:42│7 bytes│ NEC floppy controller chip status bytes (see Chapter 15)
  811. │40:49│  byte │ Video Control Data Area 1
  812. └─────┴───────┤ current CRT mode (hex value)
  813.               │    00h 40x25 BW      (CGA)        01h 40x25 color   (CGA)
  814.               │    02h 80x25 BW      (CGA)        03h 80x25 color   (CGA)
  815.               │    04h 320x200 color (CGA)        05h 320x200 BW    (CGA)
  816.               │    06h 640x200 BW    (CGA)        07h monochrome    (MDA)
  817.               │extended video modes (EGA/MCGA/VGA or other)
  818.               │    08h lores,16 color             09h med res,16 color
  819.               │    0Ah hires,4 color              0Bh n/a
  820.               │    0Ch med res,16 color           0Dh hires,16 color
  821. ┌─────┬───────┤    0Eh hires,4 color              0Fh hires,64 color
  822. │40:4A│  word │ # of columns on screen, coded as hex number of columns
  823. └─────┴───────┤ 20 col = 14h  (video mode 8, low res 160x200 CGA graphics)
  824.               │ 40 col = 28h
  825. ┌─────┬───────┤ 80 col = 46h
  826. │40:4C│  word │ screen buffer length in bytes
  827. ├─────┼───────┤(# of bytes used per screen page, varies with video mode)
  828. │40:4E│  word │ current screen buffer starting offset (active page)
  829. │40:50│8 words│ cursor position pages 1-8
  830. └─────┴───────┤ the first byte of each word gives the column (0-19, 39,
  831. ┌─────┬───────┤ or 79)  The second byte gives the row (0-24)
  832. │40:60│  byte │ end line for cursor   (normally 1)
  833. │40:61│  byte │ start line for cursor (normally 0)
  834. │40:62│  byte │ current video page being displayed  (0-7)
  835. │40:63│  word │ base port address of 6845 CRT controller or equivalent
  836. ├─────┼───────┤ for active display           3B4h=mono, 3D4h=color
  837. │40:65│  byte │ current setting of the CRT mode register
  838. │40:66│  byte │ current palette mask setting  (CGA)
  839. │40:67│5 bytes│ temporary storage for SS:SP during shutdown (cassette
  840. │     │       │  interface)
  841. │40:67│2 bytes│ Phoenix BIOS, address offset of option ROM
  842. │40:6C│  word │ timer counter low word
  843. │40:6E│  word │ timer counter high word
  844. │40:69│2 bytes│ Phoenix BIOS, address segment of option ROM
  845. │40:69│  byte │ HD_INSTALL (Columbia PCs) (not valid on most clones)
  846. └─────┴───────┤ bit  0    0  8 inch external floppy drives
  847.               │           1  5-1/4 external floppy drives
  848.               │      1,2     highest drive address which int 13 will
  849.               │              accept (since the floppy drives are
  850.               │              assigned 0-3, subtract 3 to obtain the number
  851.               │              of hard disks installed)
  852.               │      4,5     # of hard disks connected to expansion
  853.               │              controller
  854.               │      6,7     # of hard disks on motherboard controller
  855.               │              (if bit 6 or 7 = 1, no A: floppy is present
  856.               │              and the maximum number of floppies from int
  857. ┌─────┬───────┤              11h is 3)
  858. │40:6B│  byte │ last interrupt that occurred (used during POST only)
  859. │40:6C│2 bytes│ least significant timer count (ints 08h, 1Ah)
  860. │40:6E│2 bytes│ most significant timer count (ints 08h, 1Ah)
  861. │40:70│  byte │ 24 hour timer overflow 1 if timer went past midnight
  862. ├─────┼───────┤ it is reset to 0 each time it is read by int 1Ah
  863. │40:71│  byte │ control-break flag (bit 7 = 1 means break key hit)
  864. │40:72│  word │ reset flag
  865. └─────┴───────┤ PCjr keeps 1234h here for softboot when a cartridge is
  866.               │ inserted
  867.               │ bits 1234h = soft reset, memory check will be bypassed
  868.               │      4321h = preserve memory         (PS/2, Phoenix BIOS)
  869.               │      5678h = system suspended        (Convertible)
  870.               │      9ABCh = manufacturing test mode (Convertible)
  871.               │      ABCDh = system POST loop mode   (Convertible)
  872. ┌─────┬───────┤      0064h = burn-in mode            (Phoenix BIOS)
  873. │40:74│  byte │ status of last hard disk operation ; PCjr special disk
  874. │     │       │ control (see Chapter 8 for codes)
  875. │40:75│  byte │ # of hard disks attached (0-2)     ; PCjr special disk
  876. │     │       │                                    ; control
  877. │40:76│  byte │ HD control byte; temporary holding area for 6th 
  878. │     │       │   parameter table entry
  879. │40:77│  byte │ port offset to current hd adapter  ; PCjr special disk
  880. │     │       │                                    ; control
  881. │40:78│4 bytes│ timeout value for LPT1, LPT2, LPT3, LPT4
  882. │40:7C│4 bytes│ timeout value for COM1, COM2, COM3, COM4 (0-0FFh secs,
  883. │     │       │     default 1)
  884. │40:80│  word │ pointer to start of circular keyboard buffer,
  885. │     │       │     default 03:1E
  886. │40:82│  word │ pointer to end of circular keyboard buffer,
  887. │     │       │     default 03:3E
  888. └─────┴───────┤ note: early Zenith Z183 BIOS set these pointers to
  889. ┌─────┬───────┤       zero and ignored them.
  890. │40:84│  .... │ Video Control Data Area 2, 0040:0084 through 0040:008A
  891. │40:84│  byte │ rows on the screen minus 1 (EGA only)
  892. │40:84│  byte │ PCjr interrupt flag; timer channel 0  (used by POST)
  893. │40:84│  byte │ early AT&T 6300 PCs put 35h here for some reason,
  894. └─────┴───────┤ messing up programs that check here for number of screen
  895. ┌─────┬───────┤ rows. Later versions of the 6300 put the screen rows here
  896. │40:85│  word │ bytes per character (EGA only)
  897. │40:85│2 bytes│ (PCjr only) typamatic character to repeat
  898. │40:86│2 bytes│ (PCjr only) typamatic initial delay
  899. │40:87│  byte │ mode options (EGA only)
  900. └─────┴───────┤ bit 0   0   cursor emulation in effect
  901.               │         1   no cursor emulation
  902.               │     1   0   EGA is connected to a color display
  903.               │         1   EGA is connected to monochrome TTL display
  904.               │     2   0   wait for vertical retrace (CGA active)
  905.               │         1   don't wait for vertical retrace
  906.               │              (EGA or MDA active)
  907.               │     3   0   EGA is the active display,
  908.               │         1   "other" display is active.
  909.               │     4       reserved
  910.               │     5,6     EGA memory size
  911.               │             0,0   64k
  912.               │             0,1   128k
  913.               │             1,0   192k
  914.               │             1,1   256k
  915.               │     7   0   don't clear screen on mode changes
  916.               │         1   if the last "set mode" specified not to
  917.               │             clear the video buffer
  918.               │ mode combinations:
  919.               │ bit3  bit1     Meaning
  920.               │   0     0   EGA is active display and is color
  921.               │   0     1   EGA is active display and is monochrome
  922.               │   1     0   EGA is not active, a mono card is active
  923. ┌─────┬───────┤   1     1   EGA is not active, a CGA is active
  924. │40:87│  byte │ (PCjr only) current Fn key code
  925. ├─────┼───────┤             80h bit indicates make/break key code?
  926. │40:88│  byte │ feature bits and switches (EGA only) 0=on, 1=off
  927. └─────┴───────┤ bit 0   switch 1
  928.               │     1   switch 2
  929.               │     2   switch 3
  930.               │     3   switch 4
  931. ┌─────┬───────┤     4-7 feature bits
  932. │40:88│  byte │ (PCjr only) special keyboard status byte
  933. └─────┴───────┤ bit 7  function flag
  934.               │     6  Fn-B break
  935.               │     5  Fn pressed
  936.               │     4  Fn lock
  937.               │     3  typamatic (0=enable,1=disable)
  938.               │     2  typamatic speed (0=slow,1=fast)
  939.               │     1  extra delay bef.typamatic (0=enable)
  940. ┌─────┬───────┤     0  write char, typamatic delay elapsed
  941. │40:89│  byte │ (PCjr) current value of 6845 reg 2 (horiz. synch) used
  942. └─────┴───────┤ by ctrl-alt-cursor screen positioning routine in ROM
  943.               │ (VGA)
  944.               │ bit 0       reserved
  945.               │     1       video summing enabled
  946.               │     2   0   for color monitor attached
  947.               │         1   for mono monitor
  948.               │     3   0   for default palette loading enabled
  949.               │     4   0   for 8x8 text font
  950.               │         1   for 8x16 text font
  951. ┌─────┬───────┤     5-7     reserved
  952. │40:8A│  byte │ (PCjr) CRT/CPU Page Register Image, default 3Fh
  953. └─────┴───────┤ (VGA)  Display Combination Code Index.  This is the value
  954.               │  set/returned by function 1Ah of the Video BIOS.  This
  955.               │  byte contains an index into the ROM BIOS Display
  956.               │  Combination Code table, which is a list of byte pairs
  957.               │  that specify valid combinations of one or two video
  958.               │  subsystems.  Video subsystems are designated by the
  959.               │  following values:
  960.               │  00h     no display
  961.               │  01h     MDA with monochrome display
  962.               │  02h     CGA with color display
  963.               │  03h     reserved
  964.               │  04h     EGA with color display
  965.               │  05h     EGA with monochrome display
  966.               │  06h     Professional Graphics Adapter
  967.               │  07h     VGA with analog monochrome display
  968.               │  08h     VGA with analog color display
  969.               │  09h     reserved
  970.               │  0Ah     MCGA with digital color display
  971.               │  0Bh     MCGA with analog monochrome display
  972.               │  0Ch     MCGA with analog color display
  973. ┌─────┬───────┤  0FFh    unrecognized video subsystem
  974. │40:8B│  byte │ last diskette data rate selected
  975. └─────┴───────┤ bit 7,6 starting data transfer rate to use
  976.               │         0,0      500 kb/sec
  977.               │         0,1      300 kb/sec
  978.               │         1,0      250 kb/sec
  979.               │         1,1      reserved
  980.               │     5,4 last step rate selected
  981.               │     3   ending data transfer rate to use
  982.               │     2   reserved
  983.               │     1   reserved
  984.               │     0   1    combination floppy/fixed disk controller
  985.               │              detected
  986.               │         0    XT floppy only controller (for 360kb drive)
  987.               │              detected
  988.               │                Data Transfer Rates
  989.               │       Kbits/sec     Media   Drive   Sectors/Track
  990.               │         250         360k    360k        9
  991.               │         300         360k    1.2M        9
  992.               │         500         1.2M    1.2M       15
  993.               │         250         720k    720k        9
  994.               │         250         720k    1.4M        9
  995. ┌─────┬───────┤         500         1.4M    1.4M       18
  996. │40:8C│  byte │ hard disk status returned by controller
  997. │40:8D│  byte │ hard disk error returned by controller
  998. │40:8E│  byte │ hard disk interrupt (bit 7 = working interrupt)
  999. │40:8F│  byte │ combo_card - status of drives 0 and 1   (Tandy)
  1000. └─────┴───────┤ bit 7   reserved
  1001.               │     6   drive type determined for drive 1
  1002.               │     5   drive multiple data rate capability for drive 1
  1003.               │         0       no multiple data rate
  1004.               │         1       multiple data rate
  1005.               │     4   1 then drive 1 has 80 tracks
  1006.               │         0 then drive 1 has 40 tracks
  1007.               │     3   reserved
  1008.               │     2   drive type determined for drive 0
  1009.               │     1   drive multiple data rate capability for drive 0
  1010.               │         0       no multiple data rate
  1011.               │         1       multiple data rate
  1012.               │     0   1       the drive 0 has 80 tracks
  1013.               │         0       the drive 0 has 40 tracks
  1014.               │
  1015.               │ combo_card - status of drives 0 and 1   (Phoenix)
  1016.               │ bit 7   reserved
  1017.               │     6   drive type determined for drive 1
  1018.               │     5   drive multiple data rate capability for drive 1
  1019.               │         0       no multiple data rate
  1020.               │         1       multiple data rate
  1021.               │     4   1       drive 1 supports change line
  1022.               │         0       drive 1 does not support change line
  1023.               │     3   reserved
  1024.               │     2   drive type determined for drive 0
  1025.               │     1   drive multiple data rate capability for drive 0
  1026.               │         0       no multiple data rate
  1027.               │         1       multiple data rate
  1028.               │     0   1       drive 0 supports change line
  1029. ┌─────┬───────┤         0       drive 0 does not support change line
  1030. │40:90│2 bytes│ media state drive 0, 1, 2, 3
  1031. └─────┴───────┤ floppy_media_state
  1032.               │ bit 7,6 Data transfer rate
  1033.               │         00 - 500 K/sec
  1034.               │         01 - 300 K/sec
  1035.               │         10 - 250 K/sec
  1036.               │         11 - reserved
  1037.               │     5   double stepping required
  1038.               │     4   media/drive determined
  1039.               │     3   reserved
  1040.               │     2-0 present state
  1041.               │         000  trying 360k in 360k drive (undetermined)
  1042.               │         001  trying 360k in 1.2M drive (undetermined)
  1043.               │         010  trying 1.2M in 1.2M drive (undetermined)
  1044.               │         011  known 360k in 360k (determined)
  1045.               │         100  known 360k in 1.2M (determined)
  1046.               │         101  known 1.2M in 1.2M (determined)
  1047.               │         110  reserved, not used
  1048. ┌─────┬───────┤         111  known 3.5" drive (determined)
  1049. │40:92│2 bytes│ Diskette media work area.  Each entry is first diskette
  1050. │     │       │ media work area value tried.  One byte per drive.  Drive
  1051. │     │       │ 0 at 92h, drive 1 at 93h.
  1052. │40:94│  byte │ current track number for drive 0
  1053. │40:95│  byte │ current track number for drive 1
  1054. │40:96│  byte │ keyboard flag byte 3 (see int 9h)
  1055. │     │       │ bits 7  read ID in progress     3  right alt down
  1056. │     │       │      6  last code was first ID  2  left alt down
  1057. │     │       │      5  forced NumLock          1  last code was E0h
  1058. │     │       │      4  101/102 kbd used        0  last code was E1h
  1059. │40:97│  byte │ keyboard flag byte 2 (see int 9h)
  1060. │     │       │ bits 7  keyboard error          3  reserved
  1061. │     │       │      6  LED update in progress  2  capslock LED status
  1062. │     │       │      5  kbd sent RESEND         1  numlock LED status
  1063. │     │       │      4  kbd sent ACK            0  scrollock LED status
  1064. │40:98│  word │ offset of user wait flag (int 08h, 15h, 1Ah)
  1065. │40:9A│  word │ segment of user wait flag (int 08h, 15h, 1Ah)
  1066. │40:9C│  word │ user wait timeout value in microseconds  (low word)
  1067. │40:9E│  word │ user wait timeout value in microseconds  (high word)
  1068. │40:A0│  byte │ real time clock wait function in use
  1069. └─────┴───────┤ bits 7    wait time elapsed and posted flag
  1070.               │      6-1  reserved
  1071. ┌─────┬───────┤      0    int 15h, function 86h (WAIT) has occurred
  1072. │40:A1│  byte │ LAN A DMA channel flags
  1073. │40:A2│2 bytes│ status LAN A 0,1
  1074. │40:A4│ dword │ saved hard disk interrupt vector
  1075. │40:A8│ dword │ SAVE_PTR: EGA pointer to table of 7 parameters in
  1076. └─────┴───────┤           segment:offset format.  Format of table:
  1077.               │ D_1 dword   pointer to 1,472 byte table of 64 video
  1078.                             parameters
  1079.               │ D_2 dword   reserved
  1080.               │ D_3 dword   reserved
  1081.               │ D_4 dword   reserved
  1082.               │ D_5 dword   reserved for future use
  1083.               │ D_6 dword   reserved for future use
  1084. ┌─────┬───────┤ D_7 dword   reserved for future use
  1085. │40:B0│2 words│ international support                   (Tandy 1000 TX)
  1086. │40:B4│  byte │ keyboard NMI control flags              (Convertible)
  1087. │40:B4│  byte │ monochrome monitor hookup detect        (Tandy 1000 TX)
  1088. │     │       │ 00h not present   0FFh  present
  1089. │40:B5│ dword │ keyboard break pending flags            (Convertible)
  1090. │40:B5│  byte │ extended equipment detect  (5 bits)     (Tandy 1000 TX)
  1091. └─────┴───────┤ bit 0 = 0   drive A is 5¼
  1092.               │         1   drive A is 3½
  1093.               │     1 = 0   drive B is 5¼
  1094.               │         1   drive B is 3½
  1095.               │     2 = 0   Tandy 1000 keyboard layout
  1096.               │         1   IBM keyboard layout
  1097.               │     3 = 0   CPU slow mode
  1098.               │         1   CPU fast mode
  1099.               │     4 = 0   internal color video support enabled
  1100.               │         1   internal color video support disabled,
  1101.               │             external video enabled (chg from mb'd
  1102.               │             to expansion card)
  1103.               │     5 = 0   no external monochrome video installed
  1104. ┌─────┬───────┤         1   external monochrome video installed
  1105. │40:B6│  byte │ extended equipment detect  (1 bit)      (Tandy 1000 TX)
  1106. └─────┴───────┤ bit 0 = 0   drive C is 5¼
  1107. ┌─────┬───────┤         1   drive C is 3½
  1108. │40:B9│  byte │ port 60 single byte queue               (Convertible)
  1109. │40:BA│  byte │ scan code of last key                   (Convertible)
  1110. │40:BB│  byte │ pointer to NMI buffer head              (Convertible)
  1111. │40:BC│  byte │ pointer to NMI buffer tail              (Convertible)
  1112. │40:BD│16bytes│ NMI scan code buffer                    (Convertible)
  1113. │40:CE│  word │ day counter                    (Convertible and after)
  1114. │  to │ -04:CF│               end of BIOS Data Area
  1115. ├─────┴───────┴─────────────────────────────────────────────────────────
  1116. │ ** End of BIOS Data Area **
  1117. │ ** Beginning of "Extra Data Area" **
  1118. ├─────┬───────┬─────────────────────────────────────────────────────────
  1119. │40:D0│-40:EF │ reserved by IBM
  1120. │40:F0│16bytes│ Inter-Application Communications Area (for use by
  1121. │40:FF│       │ apps to transfer data or parameters to each other)
  1122. └─────┴───────┤  1) Used by Turbo Power's FMARK (mark memory for TSRs).
  1123.               │  2) Used by Norton Utilities' TimeMark to store the time.
  1124.               │  3) Used by BRIEF editor.
  1125. ┌─────┬───────┤  4) TopView saves this area during task switches
  1126.                  5) Some 1992/1993 Phoenix BIOS used in Gateway 2000
  1127.                     486 DX/2 motherboards are buggy and corrupt this
  1128.                     area.
  1129. │50:00│ byte  │ DOS print screen status flag
  1130. └─────┴───────┤        00h    not active or successful completion
  1131.               │        01h    print screen in progress
  1132. ┌─────┬───────┤        0FFh   error during print screen operation
  1133. │50:01│       │ Used by BASIC
  1134. │50:02-03     │ PCjr POST and diagnostics work area
  1135. │50:04│  byte │ Single drive mode status byte - not used by AT&T DOS 2.11!
  1136. └─────┴───────┤         00     logical drive A was last active
  1137.               │         01     logical drive B was last active
  1138. ┌─────────────┤        0FFh    don't know (some DOS versions)
  1139. │50:05-0E     │ PCjr POST and diagnostics work area
  1140. │50:0F│       │ BASIC: SHELL flag (set to 02h if there is a current
  1141.                        SHELL)
  1142. │50:10│  word │ BASIC: segment address storage (set with DEF SEG)
  1143. │50:12│4 bytes│ BASIC: int 1Ch clock int vector segment:offset storage
  1144. │50:16│4 bytes│ BASIC: int 23h ctrl-break int segment:offset storage
  1145. │50:1A│4 bytes│ BASIC: int 24h disk error int vector segment:offset
  1146. │50:1B-1F     │ Used by BASIC for dynamic storage
  1147. │50:20-21     │ Used by DOS for dynamic storage
  1148. └─────┴───────┤ According to the IBM TopView programmer's reference,
  1149.               │ 50:10 through 50:21 are used by BASIC, BASICA, and
  1150. ┌─────────────┤ programs compiled by the IBM BASIC Compiler.
  1151. │50:22-2C     │ Used by DOS for diskette parameter table.  See int 1Eh
  1152. └─────┴───────┤ listing for values.  In DOS 1.0 this is located in the
  1153.               │ ROM BIOS, but in DOS 1.1 and later it is a part of DOS
  1154.               │ located at 05:22.  The first byte (out of eleven) of
  1155.               │ the Disk Parameter Table contains the hexadecimal value
  1156.               │ CF in DOS 1.0 and DF in DOS 1.1 and later.
  1157.               │ DOS 1.0   24ms
  1158. ┌─────────────┤ DOS 1.1   26ms
  1159. │50:30-33     │ Used by MODE command
  1160. │50:81│       │ number of floppies installed in the system?
  1161. │50:82│       │ first hard disk drive?
  1162. │50:83│       │ last hard disk drive?
  1163. │50:34-FF     │ Unknown - Reserved for DOS
  1164. │70:00        │ PC-MOS/386 loads into the lowest available memory,
  1165. │             │ starting from this point.
  1166. ├─────────────┴─────────────────────────────────────────────────────────
  1167. │ ** End of "Extra Data Area" **
  1168. │ ** Beginning of "Extended Data Area" **  (Phoenix specs)
  1169. │    ("EDA" is segment address of top of memory)
  1170. ├──────┬──────┬─────────────────────────────────────────────────────────
  1171. │EDA:00│ byte │ Size of EDA in Kb (usually 1)
  1172. │EDA:22│ word │ pointing device driver FAR call offset
  1173. │EDA:24│ word │ pointing device driver FAR call segment
  1174. │EDA:26│ byte │ pointing device flag (first byte)
  1175. │      │      │ bits 7 = 1  command in progress
  1176. │      │      │      6 = 1  resend
  1177. │      │      │      5 = 1  acknowlege
  1178. │      │      │      4 = 1  error
  1179. │      │      │      3 = 0  reserved
  1180. │      │      │    2-0      index count
  1181. │EDA:27│ byte │ pointing device flag (second byte)
  1182. │      │      │ bits 7      device driver FAR call flag
  1183. │      │      │    6-3 = 0  reserved
  1184. │      │      │    2-0      package size
  1185. │EDA:28│ byte │ \
  1186. │  to  │      │  pointing device data
  1187. │EDA:2E│ byte │ /
  1188. │EDA:30│      │ \
  1189. │  to  │      │  reserved
  1190. │EDA:38│      │ /
  1191. │EDA:39│ word │ initial count for fail-safe timer
  1192. └──────┴──────┴─────────────────────────────────────────────────────────
  1193.  
  1194.  
  1195. Absolute Addresses ............................................. 2**6
  1196.  
  1197. 0008:0047 IO.SYS or IBMBIO.COM IRET instruction.  This is the dummy 
  1198.           routine that interrupts 01h, 03h, and 0Fh are initialized to
  1199.           during POST. 
  1200. C000:001E EGA BIOS signature (the letters IBM) 
  1201. F000:FA6E table of characters 00h-7Fh used by int 10h video BIOS
  1202.           The first 128 characters are stored here and each occupies 8
  1203.           bytes.  The high bit ones are somewhere on the video adapter
  1204.           card.
  1205. F000:FFFE PC model identification.  Note: some early IBM XTs return
  1206.           the PC ID code.  Clones can return anything.  To identify
  1207.           the submodel you need to do  an int 15h, AH=0C0h (Return
  1208.           System Configuration Parameters).  This call is not supported
  1209.           in early XT and AT BIOSes. 
  1210. FDFF:000E check this word value to identify GRiD machines: 
  1211.           00h  GRiDCase     (Old [first release] GRiDCase)
  1212.           03h  Tempest      (Tempest GRiDCase)
  1213.           04h  GRiDCase Plus
  1214.           14h  GRiDLite
  1215.           0Ch  GRiDCase Plus Minus
  1216.           34h  GRiD 1520    (GRiD AT clone)
  1217.           74h  GRiD 1530    (GRiD-386)
  1218. FE05B     POST entry point                          (IBM standard addr.)
  1219. FE2C3     NMI handler entry point                   (IBM standard addr.)
  1220. FE3FE     int 13h hard disk services entry point    (IBM standard addr.)
  1221. FE401     hard disk parameter table                 (IBM standard addr.)
  1222. FE729     baud rate generator table                 (IBM standard addr.)
  1223. FE739     int 14h async services entry point        (IBM standard addr.)
  1224. FE82E     int 16h keyboard services entry point     (IBM standard addr.)
  1225. FE987     int 09h keyboard services entry point     (IBM standard addr.)
  1226. FEC59     int 13h diskette services entry point     (IBM standard addr.)
  1227. FEF57     int 0Eh diskette hardware ISR entry point (IBM standard addr.)
  1228. FEFC7     diskette controller parameter table       (IBM standard addr.)
  1229. FEFD2     int 17h printer services entry point      (IBM standard addr.)
  1230. FF045     int 10h video services 0-Fh entry point   (IBM standard addr.)
  1231. FF065     int 10h video services entry point        (IBM standard addr.)
  1232. FF0A4     int 1Dh MDA/CGA video parameter table     (IBM standard addr.)
  1233. FF841     int 12h memory size service entry point   (IBM standard addr.)
  1234. FF84D     int 11h equipment list service entry point(IBM standard addr.)
  1235. FF859     int 15h System Services entry point       (IBM standard addr.)
  1236. FFA6E     CGA font table                            (IBM standard addr.)
  1237. FFE6E     int 1Ah clock services entry point        (IBM standard addr.)
  1238. FFEA5     int 08h system timer ISR entry point      (IBM standard addr.)
  1239. FFEF3     initial int vector offsets loaded by POST (IBM standard addr.)
  1240. FFF53     IRET opcode for dummy interrupt handler   (IBM standard addr.)
  1241. FFF54     int 05h print screen service entry point  (IBM standard addr.)
  1242. FFFF0     80x86 power-up entry point                (part of the CPU)
  1243. FFFFE     system ID byte:                           (IBM standard addr.)
  1244.  
  1245. ┌─────────────────────────────────────────────────────────────────────┐
  1246. │ ROM BIOS    ┌ model byte                                            │
  1247. │ copyright   │    ┌ submodel byte          machine                   │
  1248. │   date      │    │    ┌ revision                                    │
  1249. ├──────────┼────┼────┼────┼───────────────────────────────────────────┤
  1250. │          │ 00 │ 00 │ 00 │ AT&T 6300, Olivetti PC                    │
  1251. │          │ 2D │ -- │ -- │ Compaq PC        (4.77mHz original)       │
  1252. │          │ 30 │ -- │ -- │ Sperry PC        (built by Mitsubishi)    │
  1253. │          │ 86 │ -- │ -- │ HP-110 portable PC                        │
  1254. │          │ 9A │ -- │ -- │ Compaq Plus      (XT compatible)          │
  1255. │ 03/30/87 │ F8 │ 00 │ 00 │ PS/2 Model 80  8580-041 (16mhz)  (-071?)  │
  1256. │ 08/28/87 │ F8 │ ?? │ ?? │ PS/2 Model 80-071  16mHz  8580            │
  1257. │ 10/07/87 │ F8 │ 01 │ 00 │ PS/2 Model 80  8580-111/311 (20mhz)       │
  1258. │ 09/17/87 │ F8 │ 01 │ 01 │ PS/2 Model 80-111  20mHz  8580            │
  1259. │ 11/21/89 │    │    │    │ PS/2 Model 80-Axx                         │
  1260. │ 04/11/88 │ F8 │ 04 │ 02 │ PS/2 Model 70-121 8570-121, 8570-E61      │
  1261. │ 04/11/88 │ F8 │ 09 │ 02 │ PS/2 Model 70 desktop                     │
  1262. │ 01/18/89 │ F8 │ 0B │ 00 │ PS/2 Model 70 Portable                    │
  1263. │ 01/18/89 │    │    │    │ PS/2 Model 73                             │
  1264. │ 01/29/88 │    │    │    │ PS/2 Model 70                             │
  1265. │ 03/17/89 │    │    │    │ PS/2 Model 70-061                         │
  1266. │ 03/17/89 │    │    │    │ PS/2 Model 70-121                         │
  1267. │ 02/20/89 │    │    │    │ PS/2 Model 70-A21                         │
  1268. │ 02/20/89 │    │    │    │ PS/2 Model 70-A61                         │
  1269. │ 10/02/89 │    │    │    │ PS/2 Model 70-B21                         │
  1270. │ 12/01/89 │    │    │    │ PS/2 Model 70-A61 --> B61                 │
  1271. │ 09/09/88 │ F8 │ 0B │ 01 │ PS/2 8573-???                             │
  1272. │       ?  │ F8 │ 0C │ 00 │ PS/2 8555-031/061                         │
  1273. │ 02/20/89 │ F8 │ 0D │  ? │ PS/2 Model 70-A21                         │
  1274. │ 06/22/88 │ F8 │ 0D │ 00 │ PS/2 Model 70 8570-A21                    │
  1275. │ 09/13/85 │ F9 │ 00 │ 00 │ PC Convertible laptop                     │
  1276. │ 09/02/86 │ FA │ 00 │ 00 │ PS/2 Model 30 8530-021                    │
  1277. │ 12/12/86 │ FA │ 00 │ 00 │ PS/2 Model 30 8530-021                    │
  1278. │ 02/05/87 │    │    │    │ PS/2 Model 30 8530-021                    │
  1279. │ 08/25/88 │    │    │    │ PS/2 Model 30 8530-E21                    │
  1280. │ 05/16/88 │    │    │    │ PS/2 Model 30 8530-E21                    │
  1281. │ 06/28/89 │    │    │    │ PS/2 Model 30 8530-Exx                    │
  1282. │ 06/26/87 │ FA │ 01 │ 00 │ PS/2 Model 25 8525                        │
  1283. │ 01/10/86 │ FB │ 00 │ 00 │ XT-2 (early)                              │
  1284. │ 01/10/86 │ FB │ 00 │ 01 │ XT Model 089   (101-key keyboard          │
  1285. │ 05/09/86 │ FB │ 01 │ 02 │ XT-2 (revised) (640k m'bd, 101 key k'bd   │
  1286. │ 01/10/84 │ FC │ -- │ -- │ AT Model 099 (original 6mHz)              │
  1287. │ 06/10/85 │ FC │ 00 │ 01 │ AT Model 5170-239 6mHz (6.6 max governor) │
  1288. │ 11/15/85 │ FC │ 01 │ 00 │ AT Model 5170-339 8mHz (8.6 max governor) │
  1289. │          │ FC │ 01 │ 00 │ Compaq 386/16                             │
  1290. │          │ FC │ 01 │ 03 │ some Phoenix 386 BIOS                     │
  1291. │          │ FC │ 01 │ 81 │ some Phoenix 386 BIOS                     │
  1292. │ 04/21/86 │ FC │ 02 │ 00 │ XT/286                                    │
  1293. │ 02/13/87 │ FC │ 04 │ 00 │ PS/2 Model 50 8550-021                    │
  1294. │ 12/22/86 │ FC │ 05 │ 00 │ PS/2 Model 60 8560                        │
  1295. │ 02/13/87 │ FC │ 05 │ 00 │ PS/2 Model 60 8560                        │
  1296. │          │ FC │ 00 │    │ 7531/2 Industrial AT                      │
  1297. │          │ FC │ 06 │    │ 7552 "Gearbox"                            │
  1298. │ 04/18/88 │ FC │ 04 │ 03 │ PS/2 50Z  8550-031/061                    │
  1299. │ 01/24/90 │ FC │ 01 │ 00 │ Compaq Deskpro 80386/25e                  │
  1300. │ 10/02/89 │ FC │ 02 │ 00 │ Compaq Deskpro 386s, 386SX, 16mHz         │
  1301. │ 08/25/88 │ FC │ 09 │ 00 │ 8530-Exx (286)                            │
  1302. │ 06/01/83 │ FD │ -- │ -- │ PCjr                                      │
  1303. │ 11/08/82 │ FE │ -- │ -- │ XT, Portable PC, XT/370, 3270PC           │
  1304. │ 04/24/81 │ FF │ -- │ -- │ PC-0   (original)(16k motherboard)        │
  1305. │ 10/19/81 │ FF │ -- │ -- │ PC-1             (64k motherboard)        │
  1306. │ 08/16/82 │ FF │ -- │ -- │ PC, XT, XT/370   (256k motherboard)       │
  1307. │ 10/27/82 │ FF │ -- │ -- │ PC with HD/EGA BIOS upgrade chipset       │
  1308. │ 02/08/90 │    │    │    │ PS/2 Model 65                             │
  1309. │ 11/02/88 │    │    │    │ PS/2 Model 55SX                           │
  1310. │ 02/07/89 │    │    │    │ PS/2 Model 73-031                         │
  1311. └──────────┴────┴────┴────┴───────────────────────────────────────────┘
  1312.  
  1313.  
  1314. The IBM PC System Interrupts (Overview) ........................ 2**7
  1315.  
  1316.   The interrupt table is stored in the very lowest location in memory, 
  1317. starting at 0000:0000h.  The locations are offset from segment 0, i.e. 
  1318. location 0000h has the address for int 0, etc.  The table is 1024 
  1319. bytes in length and contains 256 four byte vectors from 00h to 0FFh.  
  1320. Each address' location in memory can be found by multiplying the 
  1321. interrupt number by 4.  For example, int 7 could be found by (7x4=28) 
  1322. or 1Bh (0000:001Bh). 
  1323.  
  1324.   These interrupt vectors normally point to ROM tables or are taken 
  1325. over by DOS when an application is run.  Some applications revector 
  1326. these interrupts to their own code to change the way the system 
  1327. responds to the user.  DOS provides int 21h function 25h to change 
  1328. interrupts from a high level; altering the interrupt vector table 
  1329. directly is not recommended, nor would it really get you anywhere. 
  1330.  
  1331.  
  1332. Quick Chart of Interrupts 00h-0FFh ............................. 2**8
  1333.  
  1334. ┌─────────────────────┬────────────────────────────────────────────────┐
  1335. │  Interrupt Address  │                                                │
  1336. ├───────┬───────┬─────┘                        Function                │
  1337. │ Number│ (Hex) │ Type                                                 │
  1338. ├───────┼───────┼─────┬────────────────────────────────────────────────┤
  1339. │   0   │ 00-03 │ CPU │  Divide by Zero                                │
  1340. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1341. │   1   │ 04-07 │ CPU │  Single Step                                   │
  1342. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1343. │   2   │ 08-0B │ CPU │  Nonmaskable                                   │
  1344. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1345. │   3   │ 0C-0F │ CPU │  Breakpoint                                    │
  1346. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1347. │   4   │ 10-13 │ CPU │  Overflow                                      │
  1348. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1349. │   5   │ 14-17 │ BIOS│  Print Screen                                  │
  1350. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1351. │   6   │ 18-1B │ hdw │  Reserved                                      │
  1352. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1353. │   7   │ 1C-1F │ hdw │  Reserved                                      │
  1354. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1355. │   8   │ 20-23 │ hdw │  Time of Day                                   │
  1356. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1357. │   9   │ 24-27 │ hdw │  Keyboard                                      │
  1358. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1359. │   A   │ 28-2B │ hdw │  Reserved                                      │
  1360. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1361. │   B   │ 2C-2F │ hdw │  Communications (8259)                         │
  1362. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1363. │   C   │ 30-33 │ hdw │  Communications                                │
  1364. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1365. │   D   │ 34-37 │ hdw │  Disk                                          │
  1366. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1367. │   E   │ 38-3B │ hdw │  Diskette                                      │
  1368. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1369. │   F   │ 3C-3F │ hdw │  Printer                                       │
  1370. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1371. │   10  │ 40-43 │ BIOS│  Video                                         │
  1372. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1373. │   11  │ 44-47 │ BIOS│  Equipment Check                               │
  1374. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1375. │   12  │ 48-4B │ BIOS│  Memory                                        │
  1376. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1377. │   13  │ 4C-4F │ BIOS│  Diskette/Disk                                 │
  1378. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1379. │   14  │ 50-53 │ BIOS│  Serial Communications                         │
  1380. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1381. │   15  │ 54-57 │ BIOS│  Cassette, System Services                     │
  1382. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1383. │   16  │ 58-5B │ BIOS│  Keyboard                                      │
  1384. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1385. │   17  │ 5C-5F │ BIOS│  Parallel Printer                              │
  1386. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1387. │   18  │ 60-63 │ BIOS│  ROM BASIC Loader                              │
  1388. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1389. │   19  │ 64-67 │ BIOS│  Bootstrap Loader                              │
  1390. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1391. │   1A  │ 68-6B │ BIOS│  Time of Day                                   │
  1392. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1393. │   1B  │ 6C-6F │ BIOS│  Keyboard Break                                │
  1394. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1395. │   1C  │ 70-73 │ BIOS│  Timer Tick                                    │
  1396. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1397. │   1D  │ 74-77 │ BIOS│  Video Initialization                          │
  1398. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1399. │   1E  │ 78-7B │ BIOS│  Diskette Parameters                           │
  1400. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1401. │   1F  │ 7C-7F │ BIOS│  Video Graphics Characters, second set         │
  1402. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1403. │   20  │ 80-83 │ DOS │  General Program Termination                   │
  1404. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1405. │   21  │ 84-87 │ DOS │  DOS Services Function Request                 │
  1406. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1407. │   22  │ 88-8B │ DOS │  Called Program Termination Address            │
  1408. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1409. │   23  │ 8C-8F │ DOS │  Control Break Termination Address             │
  1410. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1411. │   24  │ 90-93 │ DOS │  Critical Error Handler                        │
  1412. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1413. │   25  │ 94-97 │ DOS │  Absolute Disk Read                            │
  1414. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1415. │   26  │ 98-9B │ DOS │  Absolute Disk Write                           │
  1416. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1417. │   27  │ 9C-9F │ DOS │  Terminate and Stay Resident                   │
  1418. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1419. │ 28-3F │ A0-FF │ DOS │  Reserved for DOS                              │
  1420. └───────┴───────┴─────┼────────────────────────────────────────────────┤
  1421.                       │ *29h   Fast Screen Write                       │
  1422.                       │ *2Ah   Microsoft Networks - Session Layer      │
  1423.                       │        Interrupt                               │
  1424.                       │  2Fh   Multiplex Interrupt                     │
  1425.                       │ *30h   Far jump instruction for CP/M-style     │
  1426.                       │        calls                                   │
  1427.                       │  33h   Used by Microsoft Mouse Driver          │
  1428. ┌───────┬───────┬─────┼────────────────────────────────────────────────┤
  1429. │ 40-43 │100-115│ BIOS│  Reserved for BIOS                             │
  1430. └───────┴───────┴─────┼────────────────────────────────────────────────┤
  1431.                       │  40h   Hard Disk BIOS                          │
  1432.                       │  41h   Hard Disk Parameters  (except PC1)      │
  1433.                       │  42h   Pointer to screen BIOS entry  (EGA, VGA,│
  1434.                       │        PS/2)                                   │
  1435.                       │  43h   Pointer to EGA initialization parameter │
  1436.                       │        table                                   │
  1437. ┌───────┬───────┬─────┼────────────────────────────────────────────────┤
  1438. │   44  │116-119│ BIOS│  First 128 Graphics Characters                 │
  1439. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1440. │ 45-47 │120-131│ BIOS│  Reserved for BIOS                             │
  1441. └───────┴───────┴─────┼────────────────────────────────────────────────┤
  1442.                       │  45h   Reserved by IBM  (not initialized)      │
  1443.                       │  46h   Pointer to hard disk 2 params (AT, PS/2)│
  1444.                       │  47h   Reserved by IBM  (not initialized)      │
  1445. ┌───────┬───────┬─────┼────────────────────────────────────────────────┤
  1446. │   48  │132-135│ BIOS│  PCjr Cordless Keyboard Translation            │
  1447. ├───────┼───────┼─────┼────────────────────────────────────────────────┤
  1448. │   49  │136-139│ BIOS│  PCjr Non-Keyboard Scancode Translation Table  │
  1449. └───────┴───────┴─────┼────────────────────────────────────────────────┤
  1450.                       │  4Ah   Real-Time Clock Alarm (Convertible,     │
  1451.                       │        PS/2)                                   │
  1452. ┌───────┬───────┬─────┼────────────────────────────────────────────────┤
  1453. │ 50-5F │140-17F│ BIOS│  Reserved for BIOS                             │
  1454. └───────┴───────┴─────┼────────────────────────────────────────────────┤
  1455.                       │  5Ah   Cluster Adapter BIOS entry address      │
  1456.                       │ *5Bh   IBM  (cluster adapter?)                 │
  1457.                       │  5Ch   NETBIOS interface entry port            │
  1458. ┌───────┬───────┬─────┴────────────────────────────────────────────────┤
  1459. │ 60-67 │180-19F│  User Program Interrupts (availible for general use) │
  1460. └───────┴───────┴─────┬────────────────────────────────────────────────┤
  1461.                       │  60h   10-Net Network                          │
  1462.                       │  67h   Used by LIM & AQA EMS, EEMS             │
  1463. ┌───────┬───────┬─────┴────────────────────────────────────────────────┤
  1464. │ 68-7F │1A0-1FF│  Reserved by IBM                                     │
  1465. └───────┴───────┴─────┬────────────────────────────────────────────────┤
  1466.                       │  6Ch   System Resume Vector (Convertible)      │
  1467.                       │  6Fh   some Novell and 10-Net API functions    │
  1468.                       │  70h   IRQ 8, Real Time Clock Interrupt (AT,   │
  1469.                       │               PS/2)                            │
  1470.                       │  71h   IRQ 9, LAN Adapter 1                    │
  1471.                       │  72h   IRQ 10  (AT, XT/286, PS/2)  Reserved    │
  1472.                       │  73h   IRQ 11  (AT, XT/286, PS/2)  Reserved    │
  1473.                       │  74h   IRQ 12  Mouse Interrupt (PS/2)          │
  1474.                       │  75h   IRQ 13, Coprocessor Error               │
  1475.                       │  76h   IRQ 14, Hard Disk Controller (AT, PS/2) │
  1476.                       │  77h   IRQ 15 (AT, XT/286, PS/2)  Reserved     │
  1477.                       │  7Ch   IBM REXX88PC command language           │
  1478. ┌───────┬───────┬─────┴────────────────────────────────────────────────┤
  1479. │ 80-85 │200-217│  ROM BASIC                                           │
  1480. ├───────┼───────┼──────────────────────────────────────────────────────┤
  1481. │ 86-F0 │218-3C3│  Used by BASIC Interpreter When BASIC is running     │
  1482. ├───────┼───────┼──────────────────────────────────────────────────────┤
  1483. │ F1-FF │3C4-3FF│  Reserved by IBM                                     │
  1484. └───────┴───────┴──────┬───────────────────────────────────────────────┤
  1485.                        │ *0F8h  Set Shell Interrupt (OEM)              │
  1486.                        │ *0F9h  OEM SHELL service codes                │
  1487.                        └───────────────────────────────────────────────┘
  1488.  
  1489.  
  1490.  
  1491. IRQ Usage Chart ................................................ 2**9
  1492.  
  1493.   The 8259-1 Programmable Interrupt Controller (PIC) has eight 
  1494. interrupt request (IRQ) levels.  Lower numbered IRQs have higher 
  1495. priority.  On AT and PS/2 machines, a second 8259 chip is cascaded off 
  1496. the IRQ2 channel. Channels marked with an asterisk (*) are normally 
  1497. available. 
  1498.  
  1499.  (IRQ0)   55ms timer "tick" issued 18.2 times per second.
  1500.  (IRQ1)   keyboard
  1501. *(IRQ2)   for ATs, IRQ2 is used to support the second interrupt 
  1502.           controller.  In this case, int 71h (IRQ 9) is used to
  1503.           replace IRQ 2.  Hardware calls to int 71h are redirected
  1504.           to this interrupt to maintain compatibility. 
  1505.                 IRQ 8   Real Time Clock Interrupt (AT, PS/2)
  1506.               * IRQ 9   LAN Adapter 1
  1507.               * IRQ 10  (AT, XT/286, PS/2)  Reserved
  1508.               * IRQ 11  (AT, XT/286, PS/2)  Reserved
  1509.               * IRQ 12  used by EISA machines, also PS/2 Mouse
  1510.                         Interrupt
  1511.                 IRQ 13  Coprocessor Error
  1512.                 IRQ 14  Hard Disk Controller (AT, PS/2)
  1513.               * IRQ 15 (AT, XT/286, PS/2)  Reserved
  1514. *(IRQ3)   Serial Port 2 (COM2)
  1515. *(IRQ4)   Serial Port 1 (COM1) or internal modem in PCjr or
  1516.           Convertible
  1517. *(IRQ5)   XT hard disk, free on standard AT
  1518.  (IRQ6)   floppy controller
  1519.  (IRQ7)   LPT1, LPT2
  1520.  
  1521.   Two cards generally cannot share the same IRQ without conflict on 
  1522. ISA bus machines.  EISA and PS/2 machines can share IRQs, but require 
  1523. specially designed cards to do so. 
  1524.  
  1525.  
  1526. The IBM-PC System Interrupts (in detail) ....................... 2**10
  1527.  
  1528. ┌─────────────────────────────────────────────────────────────────────┐
  1529. │Interrupt  00h Divide by Zero                                        │
  1530. └─────────────────────────────────────────────────────────────────────┘
  1531. (0:0000h) (processor error).  Automatically called at end of DIV or
  1532.           IDIV operation that results in error.  Normally set by DOS to 
  1533.           display an error message and abort the program. 
  1534.  
  1535. note 1) On an 8086/8088, the return address points to the following
  1536.         instruction.
  1537.      2) On an 80286/80386, the return address points to the divide
  1538.         instruction.
  1539.      3) Trapped by PC-MOS/386 to provide a default handler for divide
  1540.         overflow  conditions.  If the application does not have its own
  1541.         handler, MOS will terminate the program with an appropriate
  1542.         message.
  1543.  
  1544.  
  1545. ┌─────────────────────────────────────────────────────────────────────┐
  1546. │Interrupt  01h Single Step                                           │
  1547. └─────────────────────────────────────────────────────────────────────┘
  1548. (0:0004h)  Taken after every instruction when CPU Trap Flag indicates
  1549.            single-step mode (bit 8 of FLAGS is 1). This is what makes
  1550.            the "T" command of DEBUG work for single stepping.  Is not
  1551.            generated after MOV to segment register or POP of segment
  1552.            register. (unless you have a very early 8088 with the
  1553.            microcode bug).
  1554.  
  1555.  
  1556. ┌─────────────────────────────────────────────────────────────────────┐
  1557. │Interrupt  02h Non-Maskable Interrupt (NMI)                          │
  1558. └─────────────────────────────────────────────────────────────────────┘
  1559. (0:0008h)  Vector not disabled via CLI.  Generated by NMI signal in
  1560.            hardware.  This function is called in the event of a memory
  1561.            parity error or may occur in the event of other hardware
  1562.            problems or failures depending on the specific
  1563.            manufacturer's hardware.  Displays the appropriate error
  1564.            message and halts the processor.
  1565.  
  1566.            Some AT chip sets apparently use int 02h to signal I/O errors
  1567.            as well as parity errors.
  1568.  
  1569.            This signal has various uses:
  1570.  
  1571.      POST parity error:                  all except PCjr & Convertible
  1572.      80x87 coprocessor interrupt:        all except PCjr & Convertible
  1573.      Keyboard interrupt:                 PCjr, Convertible
  1574.      I/O channel check:                  Convertible, PS/2 50+
  1575.      Disk controller power-on request:   Convertible
  1576.      System suspend:                     Convertible
  1577.      Realtime clock:                     Convertible
  1578.      System watchdog timer:              PS/2 50+
  1579.      Timeout interrupt:                  PS/2 50+
  1580.      DMA timer time-out interrupt:       PS/2 50+
  1581.      Infrared keyboard link:             PCjr
  1582.  
  1583.  
  1584. ┌─────────────────────────────────────────────────────────────────────┐
  1585. │Interrupt  03h Breakpoint                                            │
  1586. └─────────────────────────────────────────────────────────────────────┘
  1587. (0:000Ch)  Taken when CPU executes the 1-byte int 3 (0CCh).  Similar to
  1588. (internal) the 8080's RST instruction.  Generally used to set
  1589.            breakpoints for DEBUG.
  1590.  
  1591. note 1)  Also used by Turbo Pascal versions 1,2,3 when {$U+} specified.
  1592.      2)  Int 3s are sometimes inserted by the Microsoft Linker in
  1593.          response to an unresolved symbol.
  1594.  
  1595.  
  1596. ┌─────────────────────────────────────────────────────────────────────┐
  1597. │Interrupt  04h Divide overflow                                       │
  1598. └─────────────────────────────────────────────────────────────────────┘
  1599. (0:0010h)  Generated by INTO instruction if OF flag is set.  If the 
  1600. (internal) flag is not set, INTO is effectively a NOP.  Used to trap
  1601.            any arithmetic errors when program is ready to handle them
  1602.            rather than immediately when they occur.
  1603.  
  1604.  
  1605. ┌─────────────────────────────────────────────────────────────────────┐
  1606. │Interrupt  05h Print Screen                                          │
  1607. └─────────────────────────────────────────────────────────────────────┘
  1608. (0:0014h)  Service dumps the screen to the printer.  Invoked by int 9
  1609.            for shifted key 55 (PrtSc).  Automatically called by the
  1610.            keyboard scan when PrtSc key is pressed.  Normally executes
  1611.            a routine to print the screen, but may call any routine that
  1612.            can safely be executed from inside the keyboard handler.
  1613.            Status and result bytes are at address 0050:0000.
  1614.  
  1615. (internal) BOUND Check Failed (80286+)
  1616.            Generated by BOUND instruction when the value to be tested
  1617.            is less than the indicated lower bound or greater than the
  1618.            indicated upper bound.
  1619.  
  1620. entry   AH      05h
  1621. return  absolute address 50:0
  1622.         00h     print screen has not been called, or upon return
  1623.                 from a call there were no errors
  1624.         01h     print screen is already in progress
  1625.         0FFh    error encountered during printing
  1626. note 1) Uses BIOS services to read the screen.
  1627.      2) Output is directed to LPT1.
  1628.      3) Revectored into GRAPHICS.COM if GRAPHICS.COM is loaded.
  1629.      4) On the Tandy 1000TX this interrupt can be enabled or disabled
  1630.         across the expansion slots via a DIP switch.
  1631.      5) With early versions of DOS 5.0, at PrtScr of a graphics
  1632.         display gets garbage when GRAPHICS.COM is loaded.  This was
  1633.         fixed in one of the first updates.
  1634.  
  1635.  
  1636. ┌─────────────────────────────────────────────────────────────────────┐
  1637. │Interrupt  06h Reserved by IBM                                       │
  1638. └─────────────────────────────────────────────────────────────────────┘
  1639. (0:0018h)  On the Tandy 1000TX this interrupt can be enabled or
  1640.            disabled across the expansion slots via a DIP switch.
  1641.  
  1642.            PC-MOS/386 in 386 mode uses this interrupt to signal memory
  1643.            allocation errors.  The CS:IP of the offending instruction
  1644.            is placed on the stack.
  1645.  
  1646. (internal) Undefined Opcode (80286+)
  1647.  
  1648.  
  1649. ┌─────────────────────────────────────────────────────────────────────┐
  1650. │Interrupt  07h Reserved by IBM                                       │
  1651. └─────────────────────────────────────────────────────────────────────┘
  1652. (0:00C0h)  On the Tandy 1000TX this interrupt can be enabled or
  1653.            disabled across the expansion slots via a DIP switch.
  1654.  
  1655. (internal) No Math Unit Available (80286+)
  1656.  
  1657. note    The 80286 and later can be programmed to generate an int 7
  1658.         whenever an ESC instruction is encountered.  This could be used
  1659.         to emulate an 80x87 series coprocessor in software and be
  1660.         transparent to the application software.  It could also be used
  1661.         to make a non-Intel floating point processor emulate an 80x87.
  1662.  
  1663.  
  1664. ┌─────────────────────────────────────────────────────────────────────┐
  1665. │Interrupt  08h Timer                                                 │
  1666. └─────────────────────────────────────────────────────────────────────┘
  1667. (0:0020h)  55ms timer "tick" issued 18.2 times per second.
  1668.  (IRQ0)    8259-1 Interrupt Controller
  1669.            Updates the system time at [0040:006C] (low word) and
  1670.            [0040:006E] (high word) and issues an int 1Ch (timer). (Int
  1671.            1Ch points to an IRET instruction unless changed by a
  1672.            resident program).  The timer interrupt is given the highest
  1673.            maskable interrupt priority upon power up.
  1674.  
  1675. (internal) Double Fault (80286+ protected mode)  Called when multiple
  1676.            exceptions occur on one instruction, or an exception occurs
  1677.            in an exception handler.  If an exception occurs in the
  1678.            double fault handler, the CPU goes into SHUTDOWN mode (which
  1679.            circuitry in the PC/AT converts to a reset).
  1680.  
  1681. entry   AH      08h
  1682. return  absolute addresses:
  1683.         40:6C   number of interrupts since power on (4 bytes)
  1684.         40:70   number of days since power on       (1 byte)
  1685.         40:67   day counter on all products after AT
  1686.         40:40   motor control count - gets decremented and shuts off
  1687.                 diskette motor if zero
  1688. note 1) IBM PC LAN 1.2 and PC/MOS-386 require this count be 18.2Hz
  1689.         and will report errors if the timer rate is reprogrammed.
  1690.      2) Some "turbo" XT clones were shipped with slower-than-18.2Hz
  1691.         timers so they would appear faster to benchmark software.
  1692.         Caveat emptor.
  1693.      3) Trapped by PC-MOS/386 to ensure task switching is performed.
  1694.         This interrupt should never be disabled when running PC-MOS.
  1695.      4) Trapped by Quarterdeck's DESQview.
  1696.  
  1697.  
  1698. ┌─────────────────────────────────────────────────────────────────────┐
  1699. │Interrupt  09h Keyboard                                              │
  1700. └─────────────────────────────────────────────────────────────────────┘
  1701. (0:0024h)  Taken whenever a key is pressed or released. This is
  1702.  (IRQ1)    normally a scan code, but may also be an ACK or NAK of a
  1703.            command on AT-type keyboards.  The hardware provides the key
  1704.            pressed in a non-ASCII scan code format read at I/O port
  1705.            60h.  The servicer acknowledges receipt of the key by
  1706.            toggling bit 7 of port 61h.  (Port 61h should be read first,
  1707.            then bit 7 ORed on, output to port 61h, then ANDed off, and
  1708.            resent to port 61h).
  1709.  
  1710.            The read key is decoded to yield an ASCII character, special
  1711.            function key (such as F1) or a control function like Left
  1712.            Shift Key.  The converted ASCII character is placed into the
  1713.            next available position in the circular keyboard queue.  It
  1714.            is put in the position indicated by queue tail when it will
  1715.            not cause the loss of earlier entered data.  The queue head
  1716.            points to the oldest key pressed in the buffer which has not
  1717.            been removed from the queue (the normal process uses int 16h
  1718.            to remove keys from the queue and return the key value to the
  1719.            int 16h caller).
  1720.  
  1721.            The 16 word queue holds up to 16 keys.  If the queue head
  1722.            equals the queue tail, the queue is empty.  Valid keys in
  1723.            the queue comprise the upper byte scan code and the lower
  1724.            byte ASCII character.  If the key pressed has no ASCII
  1725.            equivalent (i.e F1 to F12), the lower byte is zero.
  1726.  
  1727.            Toggle and shift keys are not placed in the buffer, but
  1728.            appear in the two status bytes at absolute addresses
  1729.            0040:0017 and 0040:0018.
  1730.  
  1731.            Special key combinations will cause other events to occur:
  1732.  
  1733.            a) Ctrl-Alt-Del  -  Reboot computer
  1734.            b) Print screen  -  Call int 05h to print the current screen
  1735.            c) Ctrl-Break    -  Call int 1Bh control-break key
  1736.                                processor (DOS)
  1737.  
  1738. (internal) Math Unit Protection Fault (80286+ protected mode)
  1739.  
  1740. entry   AH      09h
  1741. return  at absolute memory addresses:
  1742.         40:17   bit
  1743.                 0       right shift key depressed
  1744.                 1       left shift key depressed
  1745.                 2       control key depressed
  1746.                 3       alt key depressed
  1747.                 4       ScrollLock state has been toggled
  1748.                 5       NumLock state has been toggled
  1749.                 6       CapsLock state has been toggled
  1750.                 7       insert state is active
  1751.         40:18   bit
  1752.                 0       left control key depressed
  1753.                 1       left alt key depressed
  1754.                 2       SysReq key depressed
  1755.                 3       Pause key has been toggled
  1756.                 4       ScrollLock key is depressed
  1757.                 5       NumLock key is depressed
  1758.                 6       CapsLock key is depressed
  1759.                 7       Insert key is depressed
  1760.         40:96   bit
  1761.                 0       last code was the E1h hidden code
  1762.                 1       last code was the E0h hidden code
  1763.                 2       right control key down
  1764.                 3       right alt key down
  1765.                 4       101 key Enhanced keyboard installed
  1766.                 5       force NumLock if rd ID & kbx
  1767.                 6       last character was first ID character
  1768.                 7       doing a read ID (must be bit 0)
  1769.         40:97   bit
  1770.                 0       ScrollLock indicator
  1771.                 1       NumLock indicator
  1772.                 2       CapsLock indicator
  1773.                 3       circus system indicator
  1774.                 4       ACK received
  1775.                 5       resend received flag
  1776.                 6       mode indicator update
  1777.                 7       keyboard transmit error flag
  1778.         40:1E   keyboard buffer (20h bytes)
  1779.         40:1C   buffer tail pointer
  1780.         40:72   1234h if ctrl-alt-del pressed on keyboard
  1781.      AL   scan code
  1782. note 1) Int 05h invoked if PrtSc key pressed.
  1783.      2) Int 1Bh invoked if Ctrl-Break key sequence pressed.
  1784.      3) Int 15h, AH=85h invoked on AT and after if SysReq key is pressed.
  1785.      4) Int 15h, AH=4Fh invoked on machines after AT.
  1786.      5) Int 16h, BIOS keyboard functions, uses this interrupt.
  1787.      6) PC-MOS/386 will issue this interrupt for keystrokes ocurring on
  1788.         remote serial terminals to simulate local access.
  1789.  
  1790.  
  1791. ┌─────────────────────────────────────────────────────────────────────┐
  1792. │Interrupt  0Ah  EGA Vertical Retrace                                 │
  1793. └─────────────────────────────────────────────────────────────────────┘
  1794. (0:0028h)  used by EGA vertical retrace
  1795.  (IRQ2)    8259-1 Interrupt Controller
  1796. note 1) The TOPS and PCnet adapters use this IRQ line by default.
  1797.      2) On systems equipped with 2 interrupt controller chips (8259),
  1798.         IRQ 2 is used to support the second interrupt controller.  In
  1799.         this case, int 71h (IRQ 9) is used to replace IRQ 2.  Hardware
  1800.         calls to int 71h are redirected to this interrupt to maintain
  1801.         compatibility.
  1802.      3) IRQ 2 is used for vertical retrace signal on PS/2s with VGA on
  1803.         the motherboard.  Most aftermarket VGA boards to not use this
  1804.         interrupt.
  1805.      4) Some early Samsung machines routed IRQ2 to the onboard system
  1806.         clock and did not continue IRQ2 to the I/O bus.
  1807.      5) The Roland LAPC-1 board uses IRQ2.
  1808.      6) Elographics touchscreens use optionally use IRQ2.
  1809.  
  1810. (internal) Invalid Task State Segment (80286+ protected mode)
  1811.  
  1812.  
  1813. ┌─────────────────────────────────────────────────────────────────────┐
  1814. │Interrupt  0Bh  Communications Controller (serial port) hdw. entry   │
  1815. └─────────────────────────────────────────────────────────────────────┘
  1816. (0:002Ch)  Serial Port 2 (COM2) 8259-1
  1817.  (IRQ3)
  1818. note 1) IRQ 3 may be used by SDLC (synchronous data-link control) or
  1819.         bisynchronous communications cards instead of a serial port.
  1820.      2) The TOPS and PCnet adapters use this interrupt request line as
  1821.         an alternate.
  1822.      3) On PS/2s, COM2 through COM8 share this IRQ.
  1823.      4) For most serial boards, COM4 shares this IRQ.
  1824.      5) On the Commodore Amiga 2000 with the PC Bridge Board, this
  1825.         interrupt is used for communication between the Amiga system
  1826.         board and the Bridge Board.  This was probably the lowest IRQ
  1827.         level they felt safe using, but limits the A2000's use of
  1828.         network cards, etc.
  1829.      6) This interrupt is used by part of the stack-switching code
  1830.         added to DOS 3.2 for use with Local Area Network adapters.
  1831.      7) The PS/2 puts COM3 through COM8 at port addresses above 3FFh
  1832.         (not properly decoded by older PCs) and has all of them sharing
  1833.         IRQ3.
  1834.      8) Toshiba 1600 laptop normally connects IRQ3 only to internal
  1835.         modem slot.  You must run FORCE3.COM from Toshiba to enable
  1836.         IRQ3 for the expansion slot.
  1837.      9) The BIOS Data Area was not set up to point to COM2 on POST in
  1838.         some early IBM PS/2 Model 50Z machines.
  1839.     10) Marstek 105 scanner - optional IRQ.
  1840.     11) Elographics touchscreens use optionally use IRQ 3.
  1841.     12) Default for Stargate Plus 8 multiport serial board.
  1842.     13) Tecmar/Wangtek PC-36 tape controller board - default IRQ.
  1843.     14) Older versions of Microsoft BASICA pretty well booger the IRQ 
  1844.         and port addresses for the serial ports when they exit.
  1845.  
  1846. (internal) Not Present (80286+ protected mode)
  1847.            Generated when loading a segment register if the segment
  1848.            descriptor indicates that the segment is not currently in
  1849.            memory.  May be used to implement virtual memory.
  1850.  
  1851.  
  1852. ┌─────────────────────────────────────────────────────────────────────┐
  1853. │Interrupt  0Ch  COM1 Serial Port                                     │
  1854. └─────────────────────────────────────────────────────────────────────┘
  1855. (0:0030h)  Serial Port 1 (COM1) or internal modem in PCjr or Convertible
  1856.  (IRQ4)    8259-1
  1857. note 1) IRQ 4 may be used by SDLC (synchronous data-link control) or
  1858.         bisynchronous communications cards instead of a serial port.
  1859.      2) On some PCs, this interrupt is shared by COM3.
  1860.      3) Some Tandy computers use IRQ4 instead of IRQ5 for the hard disk
  1861.         interrupt.
  1862.      4) Best performance of mice sometimes happens when they are
  1863.         configured for IRQ4 instead of IRQ3, since some mouse drivers
  1864.         may lock system interrupts for long periods.
  1865.      5) Elographics touchscreens use optionally use IRQ 4.
  1866.      6) Older versions of Microsoft BASICA pretty well booger the IRQ 
  1867.         and port addresses for the serial ports when they exit.
  1868.  
  1869. (internal) Stack Fault (80286+ protected mode)
  1870.            Generated on stack overflow/underflow.  Note that the 80286
  1871.            will shut down in real mode if SP=1 before a push.
  1872.  
  1873.  
  1874. ┌─────────────────────────────────────────────────────────────────────┐
  1875. │Interrupt  0Dh  Hard Disk                                            │
  1876. └─────────────────────────────────────────────────────────────────────┘
  1877. (0:0034h)  Miscellaneous uses
  1878.  (IRQ5)    8259-1
  1879. note 1) Various Tandy 1000 models may use this line for the 60Hhz RAM
  1880.         refresh or as "optional bus interrupt."
  1881.      2) Used by hard disk on IBM XT and most compatibles.
  1882.      3) LPT2 on AT, XT/286, and PS/2
  1883.      4) Dummy CRT vertical retrace on PCjr
  1884.      5) Marstek 105 scanner - default IRQ.
  1885.      6) Elographics touchscreens use IRQ 5 (2,3,4 & 7 also selectable)
  1886.  
  1887. (internal) General Protection Violation (80286+)
  1888.            Called in real mode when an instruction attempts to access
  1889.            a word operand located at offset 0FFFFh or a PUSH MEM or POP
  1890.            MEM instruction contains an invalid bit code in the second
  1891.            byte, or when an instruction exceeds the maximum length
  1892.            allowed (10 bytes for 80286, 15 bytes for 80386)
  1893.  
  1894.  
  1895. ┌─────────────────────────────────────────────────────────────────────┐
  1896. │Interrupt  0Eh  Diskette Interrupt                                   │
  1897. └─────────────────────────────────────────────────────────────────────┘
  1898. (0:0038h)  Generated by floppy controller on completion of an operation
  1899.  (IRQ6)    (sets bit 8 of 40:3E)
  1900. note    Tecmar PC-36 tape controllers use this setting by default, as
  1901.         they are not intended to be used when floppies are to be
  1902.         accessed.
  1903.  
  1904. (internal) Page Fault (80386+ native mode)
  1905.  
  1906.  
  1907. ┌─────────────────────────────────────────────────────────────────────┐
  1908. │Interrupt  0Fh  Reserved by IBM                                      │
  1909. └─────────────────────────────────────────────────────────────────────┘
  1910. (0:003Ch)  IRQ7 used by 8259 PPI interrupt (LPT1, LPT2)
  1911.  (IRQ7)
  1912. note 1) Generated by the LPT1 printer adapter when printer becomes
  1913.         ready.  Many printer adapters do not reliably generate this
  1914.         interrupt.
  1915.      2) This interrupt is normally avoided.  If a bad interrupt occurs,
  1916.         it will vector to this spot (when caused by a misprogrammed
  1917.         8259 PIC)
  1918.      3) According to the Creative Labs Sound Blaster board docs, some
  1919.         Tandy 1000 models use this interrupt internally.
  1920.      4) Elographics touchscreens use optionally use IRQ 7.
  1921.  
  1922.  
  1923.  
  1924.